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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user