import { supabase } from '@/lib/supabase'; import { ThemedTextButton } from '@/components/theme'; import { Alert, StyleSheet } from 'react-native'; import React from 'react'; import { TextStyle, PressableProps, DimensionValue } from 'react-native'; // Extend ThemedButton props (which already extends PressableProps) type ThemedTextButtonProps = Omit & { width?: DimensionValue; height?: DimensionValue; fontSize?: number; fontWeight?: 'normal' | 'semibold' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; textStyle?: TextStyle; containerStyle?: object; buttonStyle?: object; }; const Logout_Button: React.FC = ({ width, height, fontSize = 16, fontWeight = 'normal', textStyle, containerStyle, buttonStyle, ...restProps }) => { const signOut = async () => { const { error } = await supabase.auth.signOut(); if (error) Alert.alert(error.message); }; return ( signOut()} {...restProps} /> ); }; export default Logout_Button;