From 61d52fae50fac122491ce2827bae60a0b4f6347b Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Tue, 16 May 2023 21:09:28 +0300 Subject: [PATCH] Fixed route in view --- src/components/ShortReport/ShortReport.jsx | 6 +++--- src/pages/ViewReport/{ViewReport.js => ViewReport.jsx} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/pages/ViewReport/{ViewReport.js => ViewReport.jsx} (99%) diff --git a/src/components/ShortReport/ShortReport.jsx b/src/components/ShortReport/ShortReport.jsx index 39562f50..8aafcc65 100644 --- a/src/components/ShortReport/ShortReport.jsx +++ b/src/components/ShortReport/ShortReport.jsx @@ -27,6 +27,7 @@ export const ShortReport = ({}) => { const [tomorrowTask, setTomorrowTask] = useState([]); const [totalHours, setTotalHours] = useState(0); const [loader, setLoader] = useState(false); + const [dateTest, setDateTest] = useState(""); function getReportFromDate(day) { setLoader(true); @@ -40,6 +41,7 @@ export const ShortReport = ({}) => { ).then((res) => { let spendTime = 0; for (const item of res) { + setDateTest(item.created_at); if (item.difficulties) { setDifficulties((prevArray) => [...prevArray, item.difficulties]); } @@ -76,9 +78,7 @@ export const ShortReport = ({}) => {

Ваши отчеты - просмотр отчета за день

- - Посмотреть подробнее об отчете - + Посмотреть подробнее об отчете
diff --git a/src/pages/ViewReport/ViewReport.js b/src/pages/ViewReport/ViewReport.jsx similarity index 99% rename from src/pages/ViewReport/ViewReport.js rename to src/pages/ViewReport/ViewReport.jsx index 97374283..0d045a58 100644 --- a/src/pages/ViewReport/ViewReport.js +++ b/src/pages/ViewReport/ViewReport.jsx @@ -46,7 +46,6 @@ export const ViewReport = () => { "cardId" )}&date=${day}` ).then((res) => { - console.log(res); let spendTime = 0; for (const item of res) { if (item.difficulties) { @@ -122,6 +121,7 @@ export const ViewReport = () => {
+
previousDay()}