Apple sign in is mostly working. Did some other stuff too

This commit is contained in:
2025-03-06 12:31:32 -06:00
parent 708c0553f5
commit 84cae666bf
10 changed files with 950 additions and 184 deletions

View File

@ -9,8 +9,8 @@ import { ThemedView } from '@/components/theme';
import { Session } from '@supabase/supabase-js';
import { useColorScheme } from '@/hooks/useColorScheme';
import { supabase } from '@/lib/supabase';
import LoginPage from '@/components/auth/Login';
import Account from '@/components/Account';
import Auth from '@/components/auth/Auth';
import PushNotificationManager from '@/services/PushNotificationManager';
// Prevent the splash screen from auto-hiding before asset loading is complete.
SplashScreen.preventAutoHideAsync();
@ -44,19 +44,21 @@ const RootLayout = () => {
}
return (
<ThemeProvider value={scheme === 'dark' ? DarkTheme : DefaultTheme}>
{session && session.user ? (
<Stack>
<Stack.Screen name='(tabs)' options={{ headerShown: false }} />
<Stack.Screen name='+not-found' />
</Stack>
) : (
<ThemedView style={{ flex: 1 }}>
<LoginPage />
</ThemedView>
)}
<StatusBar style='auto' />
</ThemeProvider>
<PushNotificationManager>
<ThemeProvider value={scheme === 'dark' ? DarkTheme : DefaultTheme}>
{session && session.user ? (
<Stack>
<Stack.Screen name='(tabs)' options={{ headerShown: false }} />
<Stack.Screen name='+not-found' />
</Stack>
) : (
<ThemedView style={{ flex: 1 }}>
<Auth />
</ThemedView>
)}
<StatusBar style='auto' />
</ThemeProvider>
</PushNotificationManager>
);
};