diff options
author | 2022-05-20 00:51:30 +0100 | |
---|---|---|
committer | 2022-05-21 17:06:33 +0100 | |
commit | 79722f7356fa8e633cfda683857100f10409bcbd (patch) | |
tree | a070e6831dd50155e71f66c3d918b57ee81d3007 /helpers.jsx | |
parent | 9996d8f36cf91a7e9932961cbf0c178a62aa14d3 (diff) | |
download | notes_mobile-79722f7356fa8e633cfda683857100f10409bcbd.tar.gz notes_mobile-79722f7356fa8e633cfda683857100f10409bcbd.tar.bz2 notes_mobile-79722f7356fa8e633cfda683857100f10409bcbd.zip |
configure eas, improve top bar
Diffstat (limited to 'helpers.jsx')
-rw-r--r-- | helpers.jsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/helpers.jsx b/helpers.jsx new file mode 100644 index 0000000..cf95ac2 --- /dev/null +++ b/helpers.jsx @@ -0,0 +1,20 @@ +import { Alert } from 'react-native'; + +export const confirmLogout = ({ logout, email }) => { + Alert.alert( + 'Are you sure?', + `Do you want to log out user ${email}?`, + [ + { + text: 'Logout', + onPress: logout, + style: 'destructive', + }, + { + text: 'Cancel', + onPress: () => {}, + style: 'cancel', + }, + ], + ); +} |