@@ -7,6 +7,8 @@ import useBreakpoints from 'lib/useBreakpoints';
7import MiniBackButton from './MiniBackButton';
7import MiniBackButton from './MiniBackButton';
8import { useHistory } from 'store/history';
8import { useHistory } from 'store/history';
10+const EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH = 2;
10// View is a top-level component that all Views must render to inherit styling
12// View is a top-level component that all Views must render to inherit styling
11function View({
13function View({
12 className,
14 className,
@@ -28,6 +30,7 @@ function View({
28 const goBack = useCallback(() => pop(), [pop]);
30 const goBack = useCallback(() => pop(), [pop]);
30 const showBackButton = size > 1 && !!pop;
32 const showBackButton = size > 1 && !!pop;
33+ const backIsLogout = size === EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH;
@@ -52,6 +55,7 @@ function View({
52 <MiniBackButton
55 <MiniBackButton
53 hpadding={!isMobile}
56 hpadding={!isMobile}
54 vpadding={isMobile}
57 vpadding={isMobile}
58+ isExit={backIsLogout}
55 onClick={goBack}
59 onClick={goBack}