aboutsummaryrefslogtreecommitdiffstats
path: root/helpers.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.jsx')
-rw-r--r--helpers.jsx20
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',
+ },
+ ],
+ );
+}