Add status to appState and new types
This commit is contained in:
parent
7b06a2900e
commit
9476f592f0
2 changed files with 18 additions and 1 deletions
15
types/index.d.ts
vendored
15
types/index.d.ts
vendored
|
|
@ -70,3 +70,18 @@ interface PerpetuityObject {
|
|||
perpetuity: boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface PageContextObj {
|
||||
party?: Party
|
||||
jobs: Job[]
|
||||
jobSkills: JobSkill[]
|
||||
raids: Raid[]
|
||||
sortedRaids: Raid[][]
|
||||
weaponKeys: GroupedWeaponKeys
|
||||
meta: { [key: string]: string }
|
||||
}
|
||||
|
||||
interface ResponseStatus {
|
||||
code: number
|
||||
text: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { proxy } from 'valtio'
|
||||
import { JobSkillObject } from '~types'
|
||||
import { JobSkillObject, ResponseStatus } from '~types'
|
||||
import { GroupedWeaponKeys } from './groupWeaponKeys'
|
||||
|
||||
const emptyJob: Job = {
|
||||
|
|
@ -86,6 +86,7 @@ interface AppState {
|
|||
jobSkills: JobSkill[]
|
||||
weaponKeys: GroupedWeaponKeys
|
||||
version: AppUpdate
|
||||
status?: ResponseStatus
|
||||
}
|
||||
|
||||
export const initialAppState: AppState = {
|
||||
|
|
@ -156,6 +157,7 @@ export const initialAppState: AppState = {
|
|||
update_type: '',
|
||||
updated_at: '',
|
||||
},
|
||||
status: undefined,
|
||||
}
|
||||
|
||||
export const appState = proxy(initialAppState)
|
||||
|
|
|
|||
Loading…
Reference in a new issue