Skip to content

Commit

Permalink
fix(ui) Remove initial redirect logic from frontend (#8401)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscollins3456 authored and yoonhyejin committed Aug 24, 2023
1 parent 6ca484a commit 2f6b958
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 63 deletions.
6 changes: 0 additions & 6 deletions datahub-web-react/src/app/context/UserContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useGetMeLazyQuery } from '../../graphql/me.generated';
import { useGetGlobalViewsSettingsLazyQuery } from '../../graphql/app.generated';
import { CorpUser, PlatformPrivileges } from '../../types.generated';
import { UserContext, LocalState, DEFAULT_STATE, State } from './userContext';
import { useInitialRedirect } from './useInitialRedirect';

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

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

/**
* Route to the most recently visited path once on first load of home page, if present in local storage.
*/
useInitialRedirect(state, localState, setState, updateLocalState);

return (
<UserContext.Provider
value={{
Expand Down
52 changes: 0 additions & 52 deletions datahub-web-react/src/app/context/useInitialRedirect.ts

This file was deleted.

5 changes: 0 additions & 5 deletions datahub-web-react/src/app/context/userContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export type State = {
loadedPersonalDefaultViewUrn: boolean;
hasSetDefaultView: boolean;
};
/**
* Whether the initial page path has been loaded.
*/
loadedInitialPath: boolean;
};

/**
Expand Down Expand Up @@ -54,7 +50,6 @@ export const DEFAULT_STATE: State = {
loadedPersonalDefaultViewUrn: false,
hasSetDefaultView: false,
},
loadedInitialPath: false,
};

export const DEFAULT_CONTEXT = {
Expand Down

0 comments on commit 2f6b958

Please sign in to comment.