mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
feat(engagement): localize limits and streaks
Use reported user timezones for daily response limits, expose couple streak state and reminders, and improve swipe and live-drawing synchronization with focused tests and documentation.
This commit is contained in:
1 parent
61ec3692b7
commit
b60c788362
42 files changed
+1308
-217
No files matched your search
@@ -3,6 +3,7 @@ import { ApiError, apiClient } from "../lib/apiClient";
|
||||
import { authClient } from "../lib/authClient";
|
||||
import { coupleApi } from "../lib/coupleApi";
|
||||
import { profileSettingsApi } from "../lib/profileSettingsApi";
|
||||
import { syncTimezone } from "../lib/reportedTimezone";
|
||||
import { Events } from "../lib/analytics";
|
||||
import type { Profile, Couple } from "@/types";
|
||||
|
||||
@@ -200,6 +201,10 @@ export const useAuthStore = create<AuthState>((set, get) => ({
|
||||
// Silently fail - this is not critical
|
||||
console.error("Failed to update last_active_at:", error);
|
||||
}
|
||||
|
||||
// Keep the server's idea of the user's timezone current so the daily
|
||||
// response limit resets at their local midnight, not 00:00 UTC.
|
||||
void syncTimezone(userId);
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user