@@ -6,6 +6,7 @@ import Footer from './Footer';
6import useBreakpoints from 'lib/useBreakpoints';
6import useBreakpoints from 'lib/useBreakpoints';
7import MiniBackButton from './MiniBackButton';
7import MiniBackButton from './MiniBackButton';
8import { useHistory } from 'store/history';
8import { useHistory } from 'store/history';
9+import NavHeader from './NavHeader';
10const EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH = 2;
11const EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH = 2;
@@ -32,6 +33,21 @@ function View({
32 const showBackButton = size > 1 && !!pop;
33 const showBackButton = size > 1 && !!pop;
33 const backIsLogout = size === EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH;
34 const backIsLogout = size === EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH;
36+ const Header = useCallback(({ logout }) => {
37+ return backIsLogout ? (
40+ className={cn(insetPadding, 'flex-row-r justify-between pb5')}>
41+ <Flex.Item onClick={logout} as="a" className="f5 gray4 underline mr2">
44+ <Flex.Item as={NavHeader.Target} />
47+ <Flex.Item className={insetPadding} as={NavHeader.Target} />
37 row={!isMobile}
53 row={!isMobile}
@@ -51,7 +67,7 @@ function View({
52 style={{ width: '48px' }}
68 style={{ width: '48px' }}
53 className={cn(insetPadding)}>
69 className={cn(insetPadding)}>
54− {showBackButton && (
70+ {showBackButton && !backIsLogout && (
55 <MiniBackButton
71 <MiniBackButton
56 hpadding={!isMobile}
72 hpadding={!isMobile}
57 vpadding={isMobile}
73 vpadding={isMobile}
@@ -62,7 +78,10 @@ function View({
62 </Flex.Item>
78 </Flex.Item>
64 <Flex.Item flex={1} as={Flex} col justify="between">
80 <Flex.Item flex={1} as={Flex} col justify="between">
65− <Flex.Item className={cn('pb5', insetPadding)}>{children}</Flex.Item>
81+ <Flex.Item className="pb5 ">
82+ <Header logout={goBack} />
66 <Flex.Item as={Footer.Target} />
85 <Flex.Item as={Footer.Target} />
67 </Flex.Item>
86 </Flex.Item>