Add theme to state and cookies

This commit is contained in:
Justin Edmund 2022-12-25 16:04:01 -08:00
parent 7d248cf91b
commit c49e930861
2 changed files with 12 additions and 9 deletions

View file

@ -3,4 +3,5 @@ interface UserCookie {
element: string
language: string
gender: number
theme: string
}

View file

@ -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
}
}