mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +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 { 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,
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user