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

@@ -7,7 +7,7 @@ import CalenderNav from "./CalenderNav";
import Day from "./Day";
const Calender = (newDate?: UpdateCalendarProps): JSX.Element => {
const { selectedDate, layout, updateDate } = useContext(CalenderContext);
const { selectedDate, layout, updateDate, currDate } = useContext(CalenderContext);
const { stickersMonth } = useContext(StickersContext);
useEffect(() => {
@@ -91,6 +91,7 @@ const Calender = (newDate?: UpdateCalendarProps): JSX.Element => {
sticker={sticker}
date={date}
selectedDate={selectedDate}
currDate={currDate}
key={
id.length
? id