diff --git a/src/assets/images/Logo neuron.svg b/src/assets/images/Logo neuron.svg new file mode 100644 index 0000000..6aff3ad --- /dev/null +++ b/src/assets/images/Logo neuron.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/hero-tps.png b/src/assets/images/hero-tps.png new file mode 100644 index 0000000..16784d1 Binary files /dev/null and b/src/assets/images/hero-tps.png differ diff --git a/src/assets/styles/_hero.scss b/src/assets/styles/_hero.scss index cd2b7c1..f2b562b 100644 --- a/src/assets/styles/_hero.scss +++ b/src/assets/styles/_hero.scss @@ -1,6 +1,6 @@ .hero { height: 60rem; - background: url("../images/hero-remake.png"); + background: url('../images/hero-remake.png'); background-repeat: no-repeat; background-size: cover; background-position: bottom; diff --git a/src/components/DocumentLink.jsx b/src/components/DocumentLink.jsx index 23f2762..21a04cd 100644 --- a/src/components/DocumentLink.jsx +++ b/src/components/DocumentLink.jsx @@ -5,7 +5,7 @@ import { ReactComponent as File } from '../assets/icons/file.svg'; const DocumentLink = ({ title, link }) => { return ( - +
diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 75c30f5..2ceab1a 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -9,7 +9,18 @@ const Footer = ({ lang }) => {
- +

diff --git a/src/components/LineChart.jsx b/src/components/LineChart.jsx index d68e083..675dedf 100644 --- a/src/components/LineChart.jsx +++ b/src/components/LineChart.jsx @@ -1,5 +1,5 @@ // Modules -import { Line } from "react-chartjs-2"; +import { Line } from 'react-chartjs-2'; import { Chart as ChartJS, LineElement, @@ -7,18 +7,12 @@ import { LinearScale, PointElement, Tooltip, -} from "chart.js"; -import { Api } from "../helpers/api"; -import { useState, useEffect } from "react"; -import { parseDate } from "../helpers/functions"; +} from 'chart.js'; +import { Api } from '../helpers/api'; +import { useState, useEffect } from 'react'; +import { parseDate } from '../helpers/functions'; -ChartJS.register( - LineElement, - PointElement, - LinearScale, - Tooltip, - CategoryScale -); +ChartJS.register(LineElement, PointElement, LinearScale, Tooltip, CategoryScale); const LineChart = ({ activeRow, tabIndex }) => { const [dataLineChart, setDataLineChart] = useState(); @@ -28,7 +22,7 @@ const LineChart = ({ activeRow, tabIndex }) => { const LineChartData = new Api( `http://tmex.gov.tm:8765/api/categories/${tabIndex}/tradings`, dataLineChart, - setDataLineChart + setDataLineChart, ).get(); } }, [tabIndex]); @@ -37,10 +31,8 @@ const LineChart = ({ activeRow, tabIndex }) => { const data = { labels: dataLineChart - ? dataLineChart.data[activeRow].all_prices.map((price) => - parseDate(price.date) - ) - : [""], + ? dataLineChart.data[activeRow].all_prices.map((price) => parseDate(price.date)) + : [''], datasets: [ { @@ -49,13 +41,13 @@ const LineChart = ({ activeRow, tabIndex }) => { if (index <= 9) { return price.price; } else { - return ""; + return ''; } }) - : [""], - borderColor: "#4b8dff", + : [''], + borderColor: '#4b8dff', pointBorderWidth: 2, - pointBackgroundColor: "#4b8dff", + pointBackgroundColor: '#4b8dff', tension: 0.1, animation: { @@ -64,11 +56,7 @@ const LineChart = ({ activeRow, tabIndex }) => { }, delay: (context) => { let delay = 0; - if ( - context.type === "data" && - context.mode === "default" && - !delayed - ) { + if (context.type === 'data' && context.mode === 'default' && !delayed) { delay = context.dataIndex * 100 + context.datasetIndex * 100; } return delay; diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index 86bc427..5232d73 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -169,7 +169,12 @@ const Home = ({ lang, setPostId }) => {
- +
{ newsData diff --git a/src/pages/NewsPostPage.jsx b/src/pages/NewsPostPage.jsx index 2ef8e8f..b919de4 100644 --- a/src/pages/NewsPostPage.jsx +++ b/src/pages/NewsPostPage.jsx @@ -1,22 +1,21 @@ -import React from "react"; -import { useParams } from "react-router-dom"; -import { useEffect, useRef } from "react"; -import { Api } from "../helpers/api"; -import { dateReverse } from "../helpers/functions"; +import React from 'react'; +import { useParams } from 'react-router-dom'; +import { useEffect, useRef } from 'react'; +import { Api } from '../helpers/api'; +import { dateReverse } from '../helpers/functions'; // Images // import postPageImg from "../assets/images/post-img.png"; -import LatestNew from "../components/LatestNew"; +import LatestNew from '../components/LatestNew'; +import SectionTitle from '../components/SectionTitle'; const NewsPostPage = ({ lang, setPostId, postsData, setPostsData }) => { const { id } = useParams(); const isFirstLoad = useRef(true); useEffect(() => { if (!postsData) { - const NewsPageApi = new Api( - "http://tmex.gov.tm:8765/api/news", - postsData, - setPostsData - ).get({ "X-localization": lang }); + const NewsPageApi = new Api('http://tmex.gov.tm:8765/api/news', postsData, setPostsData).get({ + 'X-localization': lang, + }); } }, [postsData]); @@ -25,11 +24,9 @@ const NewsPostPage = ({ lang, setPostId, postsData, setPostsData }) => { isFirstLoad.current = false; return; } - const NewsPageApi = new Api( - "http://tmex.gov.tm:8765/api/news", - postsData, - setPostsData - ).get({ "X-localization": lang }); + const NewsPageApi = new Api('http://tmex.gov.tm:8765/api/news', postsData, setPostsData).get({ + 'X-localization': lang, + }); }, [lang]); return ( @@ -57,7 +54,16 @@ const NewsPostPage = ({ lang, setPostId, postsData, setPostsData }) => {