Fixed index for sticker month array.

This commit is contained in:
Lucid Kobold
2022-01-03 14:21:40 -06:00
parent 27a6f630ba
commit e920eb41fe

View File

@@ -131,7 +131,7 @@ const CalenderContextProvider = ({
const overflowInfo = isOverflow(selectedDate, sunCurrDate);
const stickerDay = overflowInfo.isOverflow
? null
: stickersMonth[getDate(sunCurrDate)];
: stickersMonth[getDate(sunCurrDate) - 1];
const day: MonthDay = {
...overflowInfo,
@@ -169,7 +169,7 @@ const CalenderContextProvider = ({
const overflowInfo = isOverflow(selectedDate, monCurrDate);
const stickerDay = overflowInfo.isOverflow
? null
: stickersMonth[getDate(monCurrDate)];
: stickersMonth[getDate(monCurrDate) - 1];
const day: MonthDay = {
...overflowInfo,