Aucune description

Logout.js 545B

123456789101112131415161718192021
  1. import * as React from 'react';
  2. import { Button, View } from 'react-native';
  3. import * as SecureStore from 'expo-secure-store';
  4. function Logout({ navigation }) {
  5. return (
  6. <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
  7. <Button onPress={
  8. ()=>{
  9. SecureStore.deleteItemAsync('token')
  10. SecureStore.deleteItemAsync('id')
  11. navigation.push('Login')
  12. }
  13. } title="LOGOUT" />
  14. </View>
  15. );
  16. }
  17. export default Logout
  18. // navigation.navigate('Login', {screen: 'Login'})