mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
tweak(phone/gen-state): Added type-safety to gen phone global state
This commit is contained in:
1 parent
7b1d30f265
commit
d15273b7b1
1 file changed
+6
-5
@@ -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,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in new issue
Block a user