From e50731405626bdbe0f29fde61402bac34d669af8 Mon Sep 17 00:00:00 2001 From: borkopetrovicc <104987342+borkopetrovicc@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:26:58 +0200 Subject: [PATCH] feat(profiles): remove profiles from the web app --- .../HeaderUserMenu/HeaderUserMenu.tsx | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/packages/ui-react/src/containers/HeaderUserMenu/HeaderUserMenu.tsx b/packages/ui-react/src/containers/HeaderUserMenu/HeaderUserMenu.tsx index e474186ba..79e31d070 100644 --- a/packages/ui-react/src/containers/HeaderUserMenu/HeaderUserMenu.tsx +++ b/packages/ui-react/src/containers/HeaderUserMenu/HeaderUserMenu.tsx @@ -3,10 +3,7 @@ import { useUIStore } from '@jwp/ott-common/src/stores/UIStore'; import { useConfigStore } from '@jwp/ott-common/src/stores/ConfigStore'; import { useAccountStore } from '@jwp/ott-common/src/stores/AccountStore'; import { ACCESS_MODEL } from '@jwp/ott-common/src/constants'; -import { useProfiles, useSelectProfile } from '@jwp/ott-hooks-react/src/useProfiles'; -import { PATH_HOME, PATH_USER_PROFILES } from '@jwp/ott-common/src/paths'; import { useLocation, useNavigate } from 'react-router'; -import { useProfileStore } from '@jwp/ott-common/src/stores/ProfileStore'; import UserMenu from '../../components/UserMenu/UserMenu'; import useBreakpoint, { Breakpoint } from '../../hooks/useBreakpoint'; @@ -26,17 +23,6 @@ const HeaderUserMenu = () => { accessModel: state.accessModel, })); const isLoggedIn = useAccountStore(({ user }) => !!user); - const { profile } = useProfileStore(); - - const { - query: { data: { collection: profiles = [] } = {} }, - profilesEnabled, - } = useProfiles(); - - const selectProfile = useSelectProfile({ - onSuccess: () => navigate(PATH_HOME), - onError: () => navigate(PATH_USER_PROFILES), - }); const favoritesEnabled = !!features?.favoritesList; const canLogin = accessModel !== ACCESS_MODEL.AVOD; @@ -58,11 +44,11 @@ const HeaderUserMenu = () => { favoritesEnabled={favoritesEnabled} onLoginButtonClick={loginButtonClickHandler} onSignUpButtonClick={signUpButtonClickHandler} - profilesEnabled={profilesEnabled} - profile={profile} - profiles={profiles} - profileLoading={selectProfile.isLoading} - onSelectProfile={selectProfile.mutate} + profilesEnabled={false} + profile={null} + profiles={[]} + profileLoading={false} + onSelectProfile={() => {}} /> ); };