Clean up login page
This commit is contained in:
@ -3,7 +3,7 @@ import { supabase } from '@/lib/supabase';
|
||||
import * as AppleAuthentication from 'expo-apple-authentication';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
import { ThemedView } from '@/components/theme';
|
||||
import { StyleSheet, Platform } from 'react-native';
|
||||
import { StyleSheet, Platform, Alert } from 'react-native';
|
||||
import Constants from 'expo-constants';
|
||||
import * as Notifications from 'expo-notifications';
|
||||
import type { updateUser } from '@/constants/Types';
|
||||
@ -46,7 +46,9 @@ const AppleSignInButton = () => {
|
||||
};
|
||||
const { error: authUpdateError } = await supabase.auth.updateUser({
|
||||
data,
|
||||
})
|
||||
});
|
||||
if (authUpdateError)
|
||||
Alert.alert('Error updating auth info:', authUpdateError.message);
|
||||
const { error: updateError } = await supabase
|
||||
.from('profiles')
|
||||
.upsert({
|
||||
@ -78,7 +80,6 @@ const AppleSignInButton = () => {
|
||||
if (Platform.OS !== 'ios') return <ThemedView />;
|
||||
else
|
||||
return (
|
||||
<ThemedView style={styles.verticallySpaced}>
|
||||
<AppleAuthentication.AppleAuthenticationButton
|
||||
buttonType={AppleAuthentication.AppleAuthenticationButtonType.SIGN_IN}
|
||||
buttonStyle={
|
||||
@ -87,19 +88,9 @@ const AppleSignInButton = () => {
|
||||
: AppleAuthentication.AppleAuthenticationButtonStyle.WHITE
|
||||
}
|
||||
cornerRadius={5}
|
||||
style={{ width: 200, height: 64 }}
|
||||
style={{ width: '85%', height: 64 }}
|
||||
onPress={signInWithApple}
|
||||
/>
|
||||
</ThemedView>
|
||||
);
|
||||
};
|
||||
export default AppleSignInButton;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
verticallySpaced: {
|
||||
paddingTop: 4,
|
||||
paddingBottom: 4,
|
||||
alignItems: 'center',
|
||||
marginTop: 20,
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user