hensei-web/utils/accountState.tsx
Justin Edmund 0ff255d71e Changed how cookies are stored
We now have an account object and user object. Account stores critical information, where User is cosmetic/settings.
2022-03-04 06:31:21 -08:00

26 lines
519 B
TypeScript

import { proxy } from "valtio";
interface AccountState {
[key: string]: any
account: {
authorized: boolean
language: 'en' | 'jp'
user: {
id: string
username: string
picture: string
element: string
} | undefined
}
}
export const initialAccountState: AccountState = {
account: {
authorized: false,
language: 'en',
user: undefined
}
}
export const accountState = proxy(initialAccountState)