Skip to content

Commit 564d8a3

Browse files
fix(ui) Remove initial redirect logic from frontend (#8401)
1 parent dafb150 commit 564d8a3

File tree

3 files changed

+0
-63
lines changed

3 files changed

+0
-63
lines changed

datahub-web-react/src/app/context/UserContextProvider.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { useGetMeLazyQuery } from '../../graphql/me.generated';
33
import { useGetGlobalViewsSettingsLazyQuery } from '../../graphql/app.generated';
44
import { CorpUser, PlatformPrivileges } from '../../types.generated';
55
import { UserContext, LocalState, DEFAULT_STATE, State } from './userContext';
6-
import { useInitialRedirect } from './useInitialRedirect';
76

87
// TODO: Migrate all usage of useAuthenticatedUser to using this provider.
98

@@ -125,11 +124,6 @@ const UserContextProvider = ({ children }: { children: React.ReactNode }) => {
125124
}
126125
}, [state, localState.selectedViewUrn, setDefaultSelectedView]);
127126

128-
/**
129-
* Route to the most recently visited path once on first load of home page, if present in local storage.
130-
*/
131-
useInitialRedirect(state, localState, setState, updateLocalState);
132-
133127
return (
134128
<UserContext.Provider
135129
value={{

datahub-web-react/src/app/context/useInitialRedirect.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

datahub-web-react/src/app/context/userContext.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ export type State = {
2222
loadedPersonalDefaultViewUrn: boolean;
2323
hasSetDefaultView: boolean;
2424
};
25-
/**
26-
* Whether the initial page path has been loaded.
27-
*/
28-
loadedInitialPath: boolean;
2925
};
3026

3127
/**
@@ -54,7 +50,6 @@ export const DEFAULT_STATE: State = {
5450
loadedPersonalDefaultViewUrn: false,
5551
hasSetDefaultView: false,
5652
},
57-
loadedInitialPath: false,
5853
};
5954

6055
export const DEFAULT_CONTEXT = {

0 commit comments

Comments
 (0)