hensei-web/utils/accountState.tsx

24 lines
466 B
TypeScript

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