fix: pair setWeekStartDay with saveSetting in SettingsSidebar
Phase 2 migrated weekStartDay reads to profile.weekStartDay, exposing a pre-existing gap: the Mon/Sun buttons called setWeekStartDay() without saveSetting(), so profile.weekStartDay never updated on click. v1.80.1
This commit is contained in:
parent
bfb749a8a6
commit
8a0af281a5
@ -1340,13 +1340,13 @@ function SettingsSidebar({
|
||||
<div style={{ display: "flex", gap: "8px" }}>
|
||||
<button
|
||||
className={`px-3 py-2 rounded text-sm ${weekStartDay === 1 ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}`}
|
||||
onClick={() => setWeekStartDay(1)}
|
||||
onClick={() => { setWeekStartDay(1); saveSetting("weekStartDay", 1); }}
|
||||
>
|
||||
{t.monday}
|
||||
</button>
|
||||
<button
|
||||
className={`px-3 py-2 rounded text-sm ${weekStartDay === 0 ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300"}`}
|
||||
onClick={() => setWeekStartDay(0)}
|
||||
onClick={() => { setWeekStartDay(0); saveSetting("weekStartDay", 0); }}
|
||||
>
|
||||
{t.sunday}
|
||||
</button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user