tweak(phone/gen-state): Added type-safety to gen phone global state

This commit is contained in:
Taso committed 2021-04-01 13:45:10 -04:00
1 parent 7b1d30f265
commit d15273b7b1
1 file changed
+6 -5
+6 -5
View File
@@ -1,19 +1,20 @@
import { atom } from 'recoil'; import { atom } from 'recoil';
import { IServerConfig } from '../../../../../typings/config';
export const phoneState = { export const phoneState = {
visibility: atom({ visibility: atom<boolean>({
key: 'phoneVisibility', key: 'phoneVisibility',
default: false, default: false,
}), }),
phoneConfig: atom({ phoneConfig: atom<IServerConfig>({
key: 'phoneConfig', key: 'phoneConfig',
default: undefined, default: null,
}), }),
phoneReady: atom({ phoneReady: atom<boolean>({
key: 'phoneReady', key: 'phoneReady',
default: false, default: false,
}), }),
phoneTime: atom({ phoneTime: atom<string>({
key: 'phoneTime', key: 'phoneTime',
default: null, default: null,
}), }),