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 { FormattedMatch, FormattedProfile } from '../../../../../typings/match';
export const matchState = {
profiles: atom({
profiles: atom<FormattedProfile[]>({
key: 'profiles',
default: null,
}),
@@ -9,19 +10,19 @@ export const matchState = {
key: 'errorLoadingProfiles',
default: false,
}),
matches: atom({
matches: atom<FormattedMatch[]>({
key: 'matches',
default: null,
}),
errorLoadingMatches: atom({
errorLoadingMatches: atom<boolean>({
key: 'errorLoadingMatches',
default: false,
}),
myProfile: atom({
myProfile: atom<FormattedProfile | null>({
key: 'myProfile',
default: null,
}),
noProfileExists: atom({
noProfileExists: atom<boolean>({
key: 'noProfileExists',
default: false,
}),