From 435d4fc5addeefc85165c9b2769c7e0d4e5bb76f Mon Sep 17 00:00:00 2001 From: Hope87 Date: Wed, 23 Jun 2021 12:48:02 +0300 Subject: [PATCH] finished report page --- src/components/Calendar/CalendarComponent.js | 2 +- src/components/Calendar/calendarHelper.js | 8 ++++---- src/components/ReportForm/ReportForm.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Calendar/CalendarComponent.js b/src/components/Calendar/CalendarComponent.js index c75844f2..e1110887 100644 --- a/src/components/Calendar/CalendarComponent.js +++ b/src/components/Calendar/CalendarComponent.js @@ -78,7 +78,7 @@ const CalendarComponent = () => { id="btn" > - {currentMonthAndDay()} + {currentMonthAndDay(day)} )) )} diff --git a/src/components/Calendar/calendarHelper.js b/src/components/Calendar/calendarHelper.js index 50f4624a..d4c6780e 100644 --- a/src/components/Calendar/calendarHelper.js +++ b/src/components/Calendar/calendarHelper.js @@ -26,10 +26,10 @@ export function currentMonth() { return currentMonth.charAt(0).toUpperCase() + currentMonth.slice(1); } -// export function currentMonthAndDay(day) { -// return day.format('D MMMM'); -// } +export function currentMonthAndDay(day) { + return day.format('D MMMM'); +} -export function currentMonthAndDay() { +export function currentMonthAndDayReportPage() { return moment().format('D MMMM'); } diff --git a/src/components/ReportForm/ReportForm.js b/src/components/ReportForm/ReportForm.js index d2cc8c05..c995aa61 100644 --- a/src/components/ReportForm/ReportForm.js +++ b/src/components/ReportForm/ReportForm.js @@ -4,7 +4,7 @@ import calendarIcon from '../../images/calendar_icon.png'; import ellipse from '../../images/ellipse.png'; import remove from '../../images/remove.png'; import addIcon from '../../images/addIcon.png'; -import { currentMonthAndDay } from '../Calendar/calendarHelper'; +import { currentMonthAndDayReportPage } from '../Calendar/calendarHelper'; import InputsComponent from '../InputsComponent/InputsComponent'; const ReportForm = () => { @@ -32,7 +32,7 @@ const ReportForm = () => {
- {currentMonthAndDay()} + {currentMonthAndDayReportPage()}