Add theme to state and cookies
This commit is contained in:
parent
7d248cf91b
commit
c49e930861
2 changed files with 12 additions and 9 deletions
1
types/UserCookie.d.ts
vendored
1
types/UserCookie.d.ts
vendored
|
|
@ -3,4 +3,5 @@ interface UserCookie {
|
|||
element: string
|
||||
language: string
|
||||
gender: number
|
||||
theme: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue