Skip to content

Commit

Permalink
chore: remove back button on unlock screen and remove fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Aug 21, 2024
1 parent 3f2e359 commit 9bc13ab
Showing 1 changed file with 16 additions and 32 deletions.
48 changes: 16 additions & 32 deletions src/app/features/container/headers/unlock.header.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { useNavigate, useOutletContext } from 'react-router-dom';

import { SettingsSelectors } from '@tests/selectors/settings.selectors';
import { SharedComponentsSelectors } from '@tests/selectors/shared-component.selectors';

import { ArrowLeftIcon, HamburgerIcon } from '@leather.io/ui';
import { HamburgerIcon } from '@leather.io/ui';

import { RouteUrls } from '@shared/route-urls';
import { SwitchAccountOutletContext } from '@shared/switch-account';

import { Header } from '@app/components/layout/headers/header';
import { HeaderActionButton } from '@app/components/layout/headers/header-action-button';
import { HeaderGrid, HeaderGridRightCol } from '@app/components/layout/headers/header-grid';
import { LogoBox } from '@app/components/layout/headers/logo-box';
import { Settings } from '@app/features/settings/settings';
Expand All @@ -20,34 +18,20 @@ export function UnlockHeader() {
const navigate = useNavigate();

return (
<>
<Header paddingLeft={{ base: undefined, sm: 0 }}>
<HeaderGrid
leftCol={
<>
<HeaderActionButton
icon={<ArrowLeftIcon />}
onAction={() => navigate(-1)}
dataTestId={SharedComponentsSelectors.HeaderBackBtn}
/>

<LogoBox
onClick={() => navigate(RouteUrls.Home)}
hideBelow={undefined}
hideFrom="sm"
/>
</>
}
rightCol={
<HeaderGridRightCol>
<Settings
triggerButton={<HamburgerIcon data-testid={SettingsSelectors.SettingsMenuBtn} />}
toggleSwitchAccount={() => setIsShowingSwitchAccount(!isShowingSwitchAccount)}
/>
</HeaderGridRightCol>
}
/>
</Header>
</>
<Header paddingLeft={{ base: undefined, sm: 0 }}>
<HeaderGrid
leftCol={
<LogoBox onClick={() => navigate(RouteUrls.Home)} hideBelow={undefined} hideFrom="sm" />
}
rightCol={
<HeaderGridRightCol>
<Settings
triggerButton={<HamburgerIcon data-testid={SettingsSelectors.SettingsMenuBtn} />}
toggleSwitchAccount={() => setIsShowingSwitchAccount(!isShowingSwitchAccount)}
/>
</HeaderGridRightCol>
}
/>
</Header>
);
}

0 comments on commit 9bc13ab

Please sign in to comment.