From b3ba7b2d662defc3e1f6c51398ded59170f39761 Mon Sep 17 00:00:00 2001 From: Lucid Kobold <72232219+LucidKobold@users.noreply.github.com> Date: Thu, 24 Feb 2022 20:43:08 -0600 Subject: [PATCH] Removed unused imports. --- pages/calendar/[...date].tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pages/calendar/[...date].tsx b/pages/calendar/[...date].tsx index bde7f58..38d136d 100644 --- a/pages/calendar/[...date].tsx +++ b/pages/calendar/[...date].tsx @@ -6,7 +6,6 @@ import ErrorPage from "next/error"; import Calender from "../../components/calender"; import { CalenderContextProvider } from "../../contexts/CalenderContext"; import { StickersContextProvider } from "../../contexts/StickerContext"; -import { es } from "date-fns/locale"; const DateRoute: React.FC = () => { const router = useRouter(); @@ -40,8 +39,10 @@ const DateRoute: React.FC = () => { } if (date.month && date.year) { - const lastDay = getDay(endOfMonth(new Date(date.year, date.month - 1, 1))) - if (dateArr[2] && (dateArr[2] > 0 && dateArr[2] <= lastDay)) { + const lastDay = getDay( + endOfMonth(new Date(date.year, date.month - 1, 1)) + ); + if (dateArr[2] && dateArr[2] > 0 && dateArr[2] <= lastDay) { date.day = dateArr[2]; } else if (!dateArr[2]) { date.day = 1; @@ -50,7 +51,6 @@ const DateRoute: React.FC = () => { return date; } - return date; }; @@ -88,16 +88,17 @@ const DateRoute: React.FC = () => { * last month that has stickers within it (When filter is enabled) or to the creation date of the chart.. */ - return error ? - () - : - ( + return error ? ( + + ) : ( + - ) + + ); }; export default DateRoute;