From 97ef5a8871c94b282bb558e2d6b853a5f33dd115 Mon Sep 17 00:00:00 2001 From: KidLoveToPlay <63667585+Yamico@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:00:50 +0800 Subject: [PATCH] chore: apply styles to the correct month (#4151) --- web/src/components/ActivityCalendar.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/components/ActivityCalendar.tsx b/web/src/components/ActivityCalendar.tsx index b41810bd..dd4e0b7b 100644 --- a/web/src/components/ActivityCalendar.tsx +++ b/web/src/components/ActivityCalendar.tsx @@ -84,9 +84,10 @@ const ActivityCalendar = (props: Props) => { "w-6 h-6 text-xs rounded-xl flex justify-center items-center border cursor-default", "text-gray-400", item.isCurrentMonth ? getCellAdditionalStyles(count, maxCount) : "opacity-60", - isToday && "border-zinc-400", - isSelected && "font-bold border-zinc-400", - !isToday && !isSelected && "border-transparent", + item.isCurrentMonth && isToday && "border-zinc-400", + item.isCurrentMonth && isSelected && "bg-success font-bold", + item.isCurrentMonth && !isToday && !isSelected && "border-transparent", + !item.isCurrentMonth && "border-transparent", )} onClick={() => count && onClick && onClick(date)} >