@@ -6,6 +6,7 @@ import Footer from './Footer';
66import useBreakpoints from 'lib/useBreakpoints';
77import MiniBackButton from './MiniBackButton';
88import { useHistory } from 'store/history';
9+import NavHeader from './NavHeader';
910
1011const EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH = 2;
1112
@@ -32,6 +33,21 @@ function View({
3233 const showBackButton = size > 1 && !!pop;
3334 const backIsLogout = size === EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH;
3435
36+ const Header = useCallback(({ logout }) => {
37+ return backIsLogout ? (
38+ <Flex.Item
39+ as={Flex}
40+ className={cn(insetPadding, 'flex-row-r justify-between pb5')}>
41+ <Flex.Item onClick={logout} as="a" className="f5 gray4 underline mr2">
42+ Logout
43+ </Flex.Item>
44+ <Flex.Item as={NavHeader.Target} />
45+ </Flex.Item>
46+ ) : (
47+ <Flex.Item className={insetPadding} as={NavHeader.Target} />
48+ );
49+ });
50+
3551 return (
3652 <Flex
3753 row={!isMobile}
@@ -51,7 +67,7 @@ function View({
5167 col
5268 style={{ width: '48px' }}
5369 className={cn(insetPadding)}>
54− {showBackButton && (
70+ {showBackButton && !backIsLogout && (
5571 <MiniBackButton
5672 hpadding={!isMobile}
5773 vpadding={isMobile}
@@ -62,7 +78,10 @@ function View({
6278 </Flex.Item>
6379
6480 <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} />
83+ {children}
84+ </Flex.Item>
6685 <Flex.Item as={Footer.Target} />
6786 </Flex.Item>
6887