chore: apply styles to the correct month (#4151)

This commit is contained in:
KidLoveToPlay 2024-11-27 14:00:50 +08:00 committed by GitHub
parent a51e363c7c
commit 97ef5a8871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,9 +84,10 @@ const ActivityCalendar = (props: Props) => {
"w-6 h-6 text-xs rounded-xl flex justify-center items-center border cursor-default", "w-6 h-6 text-xs rounded-xl flex justify-center items-center border cursor-default",
"text-gray-400", "text-gray-400",
item.isCurrentMonth ? getCellAdditionalStyles(count, maxCount) : "opacity-60", item.isCurrentMonth ? getCellAdditionalStyles(count, maxCount) : "opacity-60",
isToday && "border-zinc-400", item.isCurrentMonth && isToday && "border-zinc-400",
isSelected && "font-bold border-zinc-400", item.isCurrentMonth && isSelected && "bg-success font-bold",
!isToday && !isSelected && "border-transparent", item.isCurrentMonth && !isToday && !isSelected && "border-transparent",
!item.isCurrentMonth && "border-transparent",
)} )}
onClick={() => count && onClick && onClick(date)} onClick={() => count && onClick && onClick(date)}
> >