Add Sign in with Apple sorta
This commit is contained in:
23
components/auth/Logout_Button.tsx
Normal file
23
components/auth/Logout_Button.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
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({});
|
||||
Reference in New Issue
Block a user