diff --git a/types/UserCookie.d.ts b/types/UserCookie.d.ts index df04aadc..15a6c840 100644 --- a/types/UserCookie.d.ts +++ b/types/UserCookie.d.ts @@ -3,4 +3,5 @@ interface UserCookie { element: string language: string gender: number + theme: string } diff --git a/utils/accountState.tsx b/utils/accountState.tsx index 5ad320d8..fe2d3249 100644 --- a/utils/accountState.tsx +++ b/utils/accountState.tsx @@ -1,19 +1,21 @@ import { proxy } from 'valtio' +export type UserState = { + id: string + username: string + picture: string + element: string + gender: number + language: string + theme: string +} + interface AccountState { [key: string]: any account: { authorized: boolean - user: - | { - id: string - username: string - picture: string - element: string - gender: number - } - | undefined + user: UserState | undefined } }