24 lines
589 B
TypeScript
24 lines
589 B
TypeScript
import { supabase } from '@/lib/supabase';
|
|
import { ThemedView, ThemedText, ThemedTextButton, ThemedTextInput } from '@/components/theme';
|
|
import { Alert, StyleSheet, AppState } from 'react-native';
|
|
|
|
const Logout_Button = () => {
|
|
const signOut = async () => {
|
|
const { error } = await supabase.auth.signOut();
|
|
if (error) Alert.alert(error.message);
|
|
};
|
|
|
|
return (
|
|
<ThemedTextButton
|
|
width={120}
|
|
height={60}
|
|
text='Logout'
|
|
fontSize={16}
|
|
onPress={() => signOut()}
|
|
/>
|
|
);
|
|
};
|
|
export default Logout_Button;
|
|
|
|
const styles = StyleSheet.create({});
|