mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
tweak(phone/match): Added type safety to match state
This commit is contained in:
1 parent
75500a01f8
commit
a0c5f94514
1 file changed
+6
-5
@@ -1,7 +1,8 @@
|
|||||||
import { atom } from 'recoil';
|
import { atom } from 'recoil';
|
||||||
|
import { FormattedMatch, FormattedProfile } from '../../../../../typings/match';
|
||||||
|
|
||||||
export const matchState = {
|
export const matchState = {
|
||||||
profiles: atom({
|
profiles: atom<FormattedProfile[]>({
|
||||||
key: 'profiles',
|
key: 'profiles',
|
||||||
default: null,
|
default: null,
|
||||||
}),
|
}),
|
||||||
@@ -9,19 +10,19 @@ export const matchState = {
|
|||||||
key: 'errorLoadingProfiles',
|
key: 'errorLoadingProfiles',
|
||||||
default: false,
|
default: false,
|
||||||
}),
|
}),
|
||||||
matches: atom({
|
matches: atom<FormattedMatch[]>({
|
||||||
key: 'matches',
|
key: 'matches',
|
||||||
default: null,
|
default: null,
|
||||||
}),
|
}),
|
||||||
errorLoadingMatches: atom({
|
errorLoadingMatches: atom<boolean>({
|
||||||
key: 'errorLoadingMatches',
|
key: 'errorLoadingMatches',
|
||||||
default: false,
|
default: false,
|
||||||
}),
|
}),
|
||||||
myProfile: atom({
|
myProfile: atom<FormattedProfile | null>({
|
||||||
key: 'myProfile',
|
key: 'myProfile',
|
||||||
default: null,
|
default: null,
|
||||||
}),
|
}),
|
||||||
noProfileExists: atom({
|
noProfileExists: atom<boolean>({
|
||||||
key: 'noProfileExists',
|
key: 'noProfileExists',
|
||||||
default: false,
|
default: false,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in new issue
Block a user