diff --git a/src/app/system/devTools/DevMenu/DevMenu.tsx b/src/app/system/devTools/DevMenu/DevMenu.tsx index 298538c9478..1c42872a6e1 100644 --- a/src/app/system/devTools/DevMenu/DevMenu.tsx +++ b/src/app/system/devTools/DevMenu/DevMenu.tsx @@ -4,6 +4,8 @@ import { CloseIcon, Flex, Input, + Join, + LogoutIcon, ReloadIcon, Screen, Separator, @@ -97,7 +99,7 @@ export const DevMenu = ({ onClose = () => goBack() }: { onClose(): void }) => { Build:{" "} @@ -316,10 +318,34 @@ export const DevMenu = ({ onClose = () => goBack() }: { onClose(): void }) => { } const Buttons: React.FC<{ onClose(): void }> = ({ onClose }) => { + const isLoggedIn = !!GlobalStore.useAppState((state) => !!state.auth.userID) + return ( - {!!__DEV__ && ( - <> + }> + {!!isLoggedIn && ( + { + Alert.alert("Log out", undefined, [ + { + text: "Log out", + onPress() { + GlobalStore.actions.auth.signOut() + }, + }, + { + text: "Cancel", + style: "destructive", + }, + ]) + }} + hitSlop={{ top: 20, right: 20, bottom: 20, left: 20 }} + > + + + )} + + {!!__DEV__ && ( { RelayCache.clearAll() @@ -328,15 +354,13 @@ const Buttons: React.FC<{ onClose(): void }> = ({ onClose }) => { }} hitSlop={{ top: 20, right: 20, bottom: 20, left: 20 }} > - + - - - )} - - - - + )} + + + + ) }