merge(modules): gate achievements behind the achievements module flag

# Conflicts:
#	src/hooks/use-auth.ts
This commit is contained in:
Marc-André Bombeck committed 2026-06-15 21:57:43 +02:00
commit 6bde45ce0a
10 files changed
+349 -7

No files matched your search

+4 -2
View File
@@ -90,9 +90,11 @@ export interface AuthUser {
* opt-out) and already reflected here, so nav + Insights pill gates read
* this map rather than re-deriving. Coerced to `{}` against a stale /me
* payload (older server image without the field) so every gate fails open
* — a missing map never blanks the nav.
* — a missing map never blanks the nav. Optional so existing `AuthUser`
* test fixtures stay valid; `fetchMe` always populates it (empty map when
* absent), so live code reads a real map.
*/
modules: Partial<Record<ModuleKey, boolean>>;
modules?: Partial<Record<ModuleKey, boolean>>;
}
async function fetchMe(): Promise<AuthUser> {