Attempting to fix and issue with the currDay highlight. Made a currDate in thecontext state rather than using new Date() accross the app.

This commit is contained in:
Lucid Kobold
2022-04-11 12:11:43 -05:00
parent ae9ce83d9c
commit 077a38e891
5 changed files with 22 additions and 11 deletions

View File

@@ -240,7 +240,11 @@ const CalenderContextProvider = ({
}
};
const calenderContextValues = {
// * Attempting to fix an issue with static generation where the date does not appear to be updating after initial generation.
const [currDate] = useState<Date>(new Date);
const calenderContextValues: CalenderContextState = {
currDate,
selectedDate,
title: selectedDateInfo.title,
layout: selectedDateInfo.layout,