From be0ea9ba42b9df9d4e3c9e3739f25a1faa31ec9a Mon Sep 17 00:00:00 2001 From: Mirlan Date: Wed, 22 Sep 2021 13:48:15 +0600 Subject: [PATCH] fix(1658): enabled preferences (#498) --- .../PreferencesPopup/store/hooks/index.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/features/PreferencesPopup/store/hooks/index.tsx b/src/features/PreferencesPopup/store/hooks/index.tsx index ce24b77a..44d55c48 100644 --- a/src/features/PreferencesPopup/store/hooks/index.tsx +++ b/src/features/PreferencesPopup/store/hooks/index.tsx @@ -14,19 +14,18 @@ import { useSearch } from './useSearch' export const usePreferences = () => { const [firstLoad, setFirstLoad] = useLocalStore({ - // defaultValue: true, - defaultValue: false, + defaultValue: true, key: 'preferences_first_load', validator: isBoolean, }) const { close, isOpen, - // open, + open, } = useToggle() const { - // fetchInitialSports, + fetchInitialSports, onSportSelect, selectedSports, setInitialSelectedSports, @@ -55,7 +54,7 @@ export const usePreferences = () => { } = useSelectedTournaments(selectedSports, tournaments) const { - // fetchInitialPreferences, + fetchInitialPreferences, isApplyButtonDisabled, isFetching: isFetchingPrefernces, isSaving, @@ -79,10 +78,10 @@ export const usePreferences = () => { ]) const openPopup = useCallback(() => { - // fetchInitialPreferences() - // fetchInitialSports() - // open() - }, [/* fetchInitialPreferences, fetchInitialSports, open */]) + fetchInitialPreferences() + fetchInitialSports() + open() + }, [fetchInitialPreferences, fetchInitialSports, open]) const closePopup = () => { reset()