From 947c55aaead89ae33de24d9422a1a48dd05f7cd2 Mon Sep 17 00:00:00 2001 From: Abrar Amin Date: Sat, 29 Nov 2025 22:33:11 -0500 Subject: [PATCH 1/2] Initial commit --- frontend/app/(auth)/(tabs)/profile.tsx | 7 +-- frontend/app/(auth)/create-profile.tsx | 8 +-- frontend/app/_layout.tsx | 12 +++-- .../components/onboarding/PhotoUploadGrid.tsx | 2 +- frontend/app/components/ui/Button.tsx | 9 +++- .../app/components/ui/WeeklyMatchCard.tsx | 1 + frontend/app/home.tsx | 2 +- frontend/app/index.tsx | 51 +++++++++++++++++-- 8 files changed, 73 insertions(+), 19 deletions(-) diff --git a/frontend/app/(auth)/(tabs)/profile.tsx b/frontend/app/(auth)/(tabs)/profile.tsx index a9a85270..25807732 100644 --- a/frontend/app/(auth)/(tabs)/profile.tsx +++ b/frontend/app/(auth)/(tabs)/profile.tsx @@ -82,7 +82,7 @@ export default function ProfileScreen() { Alert.alert( 'Error', 'Failed to sign out: ' + - (error instanceof Error ? error.message : 'Unknown error') + (error instanceof Error ? error.message : 'Unknown error') ); } }; @@ -135,7 +135,7 @@ export default function ProfileScreen() { - {displayName} + {displayName} Member since {getMemberSinceText()} @@ -328,7 +328,8 @@ const styles = StyleSheet.create({ borderRadius: 64, }, nameContainer: { - display: 'flex', + flex: 1, + flexShrink: 1, flexDirection: 'column', }, buttonRow: { diff --git a/frontend/app/(auth)/create-profile.tsx b/frontend/app/(auth)/create-profile.tsx index 66164eae..272e4b77 100644 --- a/frontend/app/(auth)/create-profile.tsx +++ b/frontend/app/(auth)/create-profile.tsx @@ -12,11 +12,11 @@ import { Check, ChevronDown, GripVertical, Plus } from 'lucide-react-native'; import React, { useEffect, useRef, useState } from 'react'; import { Alert, - Animated as RNAnimated, Dimensions, Image, KeyboardAvoidingView, Platform, + Animated as RNAnimated, ScrollView, StatusBar, StyleSheet, @@ -810,8 +810,8 @@ export default function CreateProfileScreen() { > {}} - onRemove={() => {}} + onUpdate={() => { }} + onRemove={() => { }} canRemove={true} /> @@ -858,7 +858,7 @@ export default function CreateProfileScreen() { {data.clubs.length > 0 && ( diff --git a/frontend/app/_layout.tsx b/frontend/app/_layout.tsx index d04ec13e..9d00bbf7 100644 --- a/frontend/app/_layout.tsx +++ b/frontend/app/_layout.tsx @@ -46,6 +46,7 @@ function RootNavigator() { const [initializing, setInitializing] = useState(true); const [user, setUser] = useState(null); const [showOnboarding, setShowOnboarding] = useState(false); + const [isCheckingProfile, setIsCheckingProfile] = useState(false); const router = useRouter(); const segments = useSegments(); const appState = useRef(AppState.currentState); @@ -226,6 +227,7 @@ function RootNavigator() { if (user && !inAuthGroup) { // User is signed in but not in auth group // Check if user has a profile to determine where to redirect + setIsCheckingProfile(true); try { const profile = await getCurrentUserProfile(); @@ -362,10 +364,12 @@ function RootNavigator() { }} /> - + {showOnboarding && ( + + )} ); } diff --git a/frontend/app/components/onboarding/PhotoUploadGrid.tsx b/frontend/app/components/onboarding/PhotoUploadGrid.tsx index 3895b833..b2b25192 100644 --- a/frontend/app/components/onboarding/PhotoUploadGrid.tsx +++ b/frontend/app/components/onboarding/PhotoUploadGrid.tsx @@ -26,7 +26,7 @@ const { width: SCREEN_WIDTH } = Dimensions.get('window'); // Grid configuration const NUM_COLUMNS = 3; // 3 columns for a 2x3 grid (6 items total) const GRID_GAP = 4; // Gap between items -const HORIZONTAL_PADDING = 32; // Account for parent container padding (16 on each side) +const HORIZONTAL_PADDING = 40; // Account for parent container padding (20 on each side) // Calculate item width: (available width - gaps between items) / number of columns // With 3 columns, there are 2 gaps between them diff --git a/frontend/app/components/ui/Button.tsx b/frontend/app/components/ui/Button.tsx index 3e23fa23..ccd5fb8e 100644 --- a/frontend/app/components/ui/Button.tsx +++ b/frontend/app/components/ui/Button.tsx @@ -215,7 +215,14 @@ export default function Button({ size: 20, color: getIconColor(), })} - {title} + + {title} + {iconRight && React.createElement(iconRight, { size: 20, diff --git a/frontend/app/components/ui/WeeklyMatchCard.tsx b/frontend/app/components/ui/WeeklyMatchCard.tsx index ccd178a9..da5a3ebb 100644 --- a/frontend/app/components/ui/WeeklyMatchCard.tsx +++ b/frontend/app/components/ui/WeeklyMatchCard.tsx @@ -161,6 +161,7 @@ const styles = StyleSheet.create({ }, buttonContainer: { flexDirection: 'row', + flexWrap: 'wrap', gap: 16, flex: 1, // width: '50%', diff --git a/frontend/app/home.tsx b/frontend/app/home.tsx index 982c8452..f585a9c0 100644 --- a/frontend/app/home.tsx +++ b/frontend/app/home.tsx @@ -624,7 +624,7 @@ export default function HomePage() { {(mode === 'signup' || mode === 'login') && renderAuthForm()} {/* Onboarding Video Modal */} - + {showVideo && } { + checkVideoStatus(); + }, []); + + const checkVideoStatus = async () => { + try { + const hasShown = await hasShownOnboardingVideo(); + + if (hasShown) { + // Skip video, go directly to home + // Don't set isChecking to false - keep loading state while navigating + router.replace('/home'); + } else { + // Show video for first time + setShowVideo(true); + setIsChecking(false); + } + } catch (error) { + console.error('Error checking video status:', error); + // On error, show video to be safe + setShowVideo(true); + setIsChecking(false); + } + }; + + const handleVideoFinish = async () => { + try { + // Mark video as seen + await markOnboardingVideoAsShown(); + } catch (error) { + console.error('Error saving video status:', error); + } - const handleVideoFinish = () => { setShowVideo(false); // Navigate to home screen where the splash and auth will be router.replace('/home'); @@ -16,9 +52,14 @@ export default function Index() { // Note: Auth routing is handled by _layout.tsx // This page is only shown when user is not authenticated + if (isChecking) { + // Return empty view while checking + return ; + } + return ( - + {showVideo && } ); } From 10d0b5cca8cf331a6faa7dbddca20914a355a707 Mon Sep 17 00:00:00 2001 From: Juliet Crane Date: Sun, 30 Nov 2025 09:37:22 -0500 Subject: [PATCH 2/2] Fix typo in welcome message for profile creation --- frontend/app/(auth)/create-profile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/(auth)/create-profile.tsx b/frontend/app/(auth)/create-profile.tsx index 272e4b77..d3f51cb3 100644 --- a/frontend/app/(auth)/create-profile.tsx +++ b/frontend/app/(auth)/create-profile.tsx @@ -1014,7 +1014,7 @@ export default function CreateProfileScreen() { return ( - And now, {data.firstName}, you're redi! + And now, {data.firstName}, you're redi! {data.pictures[0] && (