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
|
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 { proxy } from 'valtio'
|
||||||
import { JobSkillObject } from '~types'
|
import { JobSkillObject, ResponseStatus } from '~types'
|
||||||
import { GroupedWeaponKeys } from './groupWeaponKeys'
|
import { GroupedWeaponKeys } from './groupWeaponKeys'
|
||||||
|
|
||||||
const emptyJob: Job = {
|
const emptyJob: Job = {
|
||||||
|
|
@ -86,6 +86,7 @@ interface AppState {
|
||||||
jobSkills: JobSkill[]
|
jobSkills: JobSkill[]
|
||||||
weaponKeys: GroupedWeaponKeys
|
weaponKeys: GroupedWeaponKeys
|
||||||
version: AppUpdate
|
version: AppUpdate
|
||||||
|
status?: ResponseStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export const initialAppState: AppState = {
|
export const initialAppState: AppState = {
|
||||||
|
|
@ -156,6 +157,7 @@ export const initialAppState: AppState = {
|
||||||
update_type: '',
|
update_type: '',
|
||||||
updated_at: '',
|
updated_at: '',
|
||||||
},
|
},
|
||||||
|
status: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const appState = proxy(initialAppState)
|
export const appState = proxy(initialAppState)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue