fix: per-device settings save to cookie only, not DB

This commit is contained in:
mARTin 2026-03-04 11:14:46 +01:00
parent 58bbbbdf52
commit 8ea3720831

View File

@ -1408,9 +1408,10 @@ export default function WeeklyView() {
return () => el.removeEventListener("wheel", handler);
}, [showSomeday, somedayExpanded]);
const saveSetting = async (key: string, value: any) => {
// Save per-device settings to cookie as well
// Per-device settings: save to cookie ONLY (not DB) so each device keeps its own value
if (DEVICE_SETTINGS_KEYS.includes(key)) {
setCookie(`setting_${key}`, String(value));
return; // Don't write to DB — that would overwrite other devices
}
try {
await fetch("/api/user/profile", {