Skip to content

Commit

Permalink
fix: use const value
Browse files Browse the repository at this point in the history
  • Loading branch information
mirovladimitrovski committed Apr 15, 2024
1 parent 65ac530 commit 7bd4072
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platforms/web/src/containers/AppRoutes/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
PATH_USER_PROFILES_EDIT_PROFILE,
PATH_SEARCH,
PATH_USER,
PATH_HOME,
} from '@jwp/ott-common/src/paths';

import useNotifications from '#src/hooks/useNotifications';
Expand All @@ -53,7 +54,7 @@ export default function AppRoutes() {
useNotifications();

if (userData.user && !userData.loading && window.location.href.includes('#token')) {
return <Navigate to={`/${location.search}`} />; // component instead of hook to prevent extra re-renders
return <Navigate to={`${PATH_HOME}${location.search}`} />; // component instead of hook to prevent extra re-renders
}

if (userData.user && selectingProfileAvatar !== null) {
Expand Down

0 comments on commit 7bd4072

Please sign in to comment.