tweak(phone/match): Added type safety to match state

This commit is contained in:
Taso committed 2021-04-01 13:38:38 -04:00
1 parent 75500a01f8
commit a0c5f94514
1 file changed
+6 -5
+6 -5
View File
@@ -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,
}), }),