From de980fb7d7205f29247d5feec54227fb2d9cdc81 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 28 Aug 2024 22:44:13 +0800 Subject: [PATCH] chore: update setting display name --- web/src/components/ActivityCalendar.tsx | 2 +- web/src/components/Settings/WorkspaceSection.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/components/ActivityCalendar.tsx b/web/src/components/ActivityCalendar.tsx index e5e13051..e2cf67c7 100644 --- a/web/src/components/ActivityCalendar.tsx +++ b/web/src/components/ActivityCalendar.tsx @@ -41,7 +41,7 @@ const ActivityCalendar = (props: Props) => { const year = dayjs(monthStr).toDate().getFullYear(); const month = dayjs(monthStr).toDate().getMonth() + 1; const dayInMonth = new Date(year, month, 0).getDate(); - const firstDay = new Date(year, month - 1, 1).getDay() - weekStartDayOffset; + const firstDay = (new Date(year, month - 1, 1).getDay() - weekStartDayOffset) % 7; const lastDay = new Date(year, month - 1, dayInMonth).getDay() - weekStartDayOffset; const weekDays = WEEK_DAYS.slice(weekStartDayOffset).concat(WEEK_DAYS.slice(0, weekStartDayOffset)); const maxCount = Math.max(...Object.values(data)); diff --git a/web/src/components/Settings/WorkspaceSection.tsx b/web/src/components/Settings/WorkspaceSection.tsx index 7f718072..45d78209 100644 --- a/web/src/components/Settings/WorkspaceSection.tsx +++ b/web/src/components/Settings/WorkspaceSection.tsx @@ -105,7 +105,7 @@ const WorkspaceSection = () => {
- {t("setting.preference-section.default-memo-visibility")} + Week start day