on master help sign in
Add link cursor to logout text
ee83871Liam Fitzgerald
src/components/View.js+6−1
@@ -30,6 +30,8 @@ function View({
30
30
31 const goBack = useCallback(() => pop(), [pop]);
31 const goBack = useCallback(() => pop(), [pop]);
32
32
33+ const goLogout = useCallback(() => pop(size - 1), [pop, size]);
34+
33 const showBackButton = size > 1 && !!pop;
35 const showBackButton = size > 1 && !!pop;
34 const backIsLogout = size === EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH;
36 const backIsLogout = size === EXPECT_LOGOUT_WHEN_POPPING_AT_DEPTH;
35
37
@@ -39,7 +41,10 @@ function View({
39 <Flex.Item
41 <Flex.Item
40 as={Flex}
42 as={Flex}
41 className={cn(insetPadding, 'flex-row-r justify-between pb5')}>
43 className={cn(insetPadding, 'flex-row-r justify-between pb5')}>
44+ <Flex.Item
45+ onClick={goLogout}
46+ as="a"
42− <Flex.Item onClick={logout} as="a" className="f5 gray4 underline mr2">
47+ className="f5 gray4 underline mr2 pointer">
43 Logout
48 Logout
44 </Flex.Item>
49 </Flex.Item>
45 <Flex.Item as={NavHeader.Target} />
50 <Flex.Item as={NavHeader.Target} />