From 4028ebcfcd152826f70947fd5d08ef75b9c86437 Mon Sep 17 00:00:00 2001 From: Mirlan Date: Fri, 10 Dec 2021 19:44:06 +0600 Subject: [PATCH] fix(2073): disabled showing pref popup after registration --- .../PreferencesPopup/store/hooks/index.tsx | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/features/PreferencesPopup/store/hooks/index.tsx b/src/features/PreferencesPopup/store/hooks/index.tsx index 5365a0b6..34aaee15 100644 --- a/src/features/PreferencesPopup/store/hooks/index.tsx +++ b/src/features/PreferencesPopup/store/hooks/index.tsx @@ -1,12 +1,9 @@ import { useEffect, useCallback } from 'react' -import isBoolean from 'lodash/isBoolean' import uniq from 'lodash/uniq' import map from 'lodash/map' -import { client } from 'config/clients' - -import { useLocalStore, useToggle } from 'hooks' +import { useToggle } from 'hooks' import { useTournamentsBySports } from './useTournamentsBySports' import { usePreferencesLoader } from './usePreferencesLoader' @@ -15,11 +12,6 @@ import { useSports } from './useSports' import { useSearch } from './useSearch' export const usePreferences = () => { - const [firstLoad, setFirstLoad] = useLocalStore({ - defaultValue: !client.disabledPreferences, - key: 'preferences_first_load', - validator: isBoolean, - }) const { close, isOpen, @@ -91,16 +83,6 @@ export const usePreferences = () => { } useEffect(reset, [reset]) - useEffect(() => { - if (firstLoad) { - openPopup() - setFirstLoad(false) - } - }, [ - firstLoad, - openPopup, - setFirstLoad, - ]) return { allTournamentsSelected,