From 79722f7356fa8e633cfda683857100f10409bcbd Mon Sep 17 00:00:00 2001 From: piotrruss Date: Fri, 20 May 2022 00:51:30 +0100 Subject: configure eas, improve top bar --- helpers.jsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 helpers.jsx (limited to 'helpers.jsx') 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', + }, + ], + ); +} -- cgit v1.2.3