diff --git a/apps/mobile/src/app/fitness-profile.tsx b/apps/mobile/src/app/fitness-profile.tsx index cab7b7f..dfcbc12 100644 --- a/apps/mobile/src/app/fitness-profile.tsx +++ b/apps/mobile/src/app/fitness-profile.tsx @@ -10,7 +10,7 @@ import { TextInput, Platform, } from 'react-native'; -import { useRouter } from 'expo-router'; +import { useRouter, Stack } from 'expo-router'; import { useAuth } from '@clerk/clerk-expo'; import { Ionicons } from '@expo/vector-icons'; import { LinearGradient } from 'expo-linear-gradient'; @@ -156,228 +156,231 @@ export default function FitnessProfileScreen() { } return ( - - {/* Header */} - - router.back()}> - - - Fitness Profile - - + <> + + + {/* Header */} + + router.back()}> + + + Fitness Profile + + - - {/* Basic Information */} - - Basic Information - - - - Height (cm) - - - - updateField('height', text ? parseFloat(text) : undefined) - } - keyboardType="decimal-pad" - placeholder="175" - placeholderTextColor={theme.colors.gray400} - /> - - - - Weight (kg) - - - - updateField('weight', text ? parseFloat(text) : undefined) - } - keyboardType="decimal-pad" - placeholder="70" - placeholderTextColor={theme.colors.gray400} - /> - - - - - Age - - - - updateField('age', text ? parseInt(text, 10) : undefined) - } - keyboardType="number-pad" - placeholder="25" - placeholderTextColor={theme.colors.gray400} - /> - - - - - - {/* Gender Selection */} - - Gender - - {GENDER_OPTIONS.map((option) => ( - updateField('gender', option.value)} - > - - - {option.label} - - - ))} - - - - {/* Fitness Goal */} - - Primary Fitness Goal - - {FITNESS_GOAL_OPTIONS.map((option, index) => ( - - updateField('fitnessGoal', option.value)} - > - - - - {option.label} - {profileData.fitnessGoal === option.value && ( - - )} - - {index < FITNESS_GOAL_OPTIONS.length - 1 && } - - ))} - - - - {/* Activity Level */} - - Activity Level - - {ACTIVITY_LEVEL_OPTIONS.map((option, index) => ( - - updateField('activityLevel', option.value)} - > - - {option.label} - {option.description} - - {profileData.activityLevel === option.value && ( - - )} - - {index < ACTIVITY_LEVEL_OPTIONS.length - 1 && } - - ))} - - - - {/* Health Information */} - - Health Information (Optional) - - - Medical Conditions - updateField('medicalConditions', text)} - placeholder="e.g., Asthma, diabetes..." - placeholderTextColor={theme.colors.gray400} - multiline - numberOfLines={3} - textAlignVertical="top" - /> - - - Allergies - updateField('allergies', text)} - placeholder="e.g., Peanuts, latex..." - placeholderTextColor={theme.colors.gray400} - multiline - numberOfLines={3} - textAlignVertical="top" - /> - - - Injuries - updateField('injuries', text)} - placeholder="e.g., Previous knee injury..." - placeholderTextColor={theme.colors.gray400} - multiline - numberOfLines={3} - textAlignVertical="top" - /> - - - - - - {/* Save Button */} - - - - {loading ? ( - - ) : ( - <> - - Save Profile - - )} - - + {/* Basic Information */} + + Basic Information + + + + Height (cm) + + + + updateField('height', text ? parseFloat(text) : undefined) + } + keyboardType="decimal-pad" + placeholder="175" + placeholderTextColor={theme.colors.gray400} + /> + + + + Weight (kg) + + + + updateField('weight', text ? parseFloat(text) : undefined) + } + keyboardType="decimal-pad" + placeholder="70" + placeholderTextColor={theme.colors.gray400} + /> + + + + + Age + + + + updateField('age', text ? parseInt(text, 10) : undefined) + } + keyboardType="number-pad" + placeholder="25" + placeholderTextColor={theme.colors.gray400} + /> + + + + + + {/* Gender Selection */} + + Gender + + {GENDER_OPTIONS.map((option) => ( + updateField('gender', option.value)} + > + + + {option.label} + + + ))} + + + + {/* Fitness Goal */} + + Primary Fitness Goal + + {FITNESS_GOAL_OPTIONS.map((option, index) => ( + + updateField('fitnessGoal', option.value)} + > + + + + {option.label} + {profileData.fitnessGoal === option.value && ( + + )} + + {index < FITNESS_GOAL_OPTIONS.length - 1 && } + + ))} + + + + {/* Activity Level */} + + Activity Level + + {ACTIVITY_LEVEL_OPTIONS.map((option, index) => ( + + updateField('activityLevel', option.value)} + > + + {option.label} + {option.description} + + {profileData.activityLevel === option.value && ( + + )} + + {index < ACTIVITY_LEVEL_OPTIONS.length - 1 && } + + ))} + + + + {/* Health Information */} + + Health Information (Optional) + + + Medical Conditions + updateField('medicalConditions', text)} + placeholder="e.g., Asthma, diabetes..." + placeholderTextColor={theme.colors.gray400} + multiline + numberOfLines={3} + textAlignVertical="top" + /> + + + Allergies + updateField('allergies', text)} + placeholder="e.g., Peanuts, latex..." + placeholderTextColor={theme.colors.gray400} + multiline + numberOfLines={3} + textAlignVertical="top" + /> + + + Injuries + updateField('injuries', text)} + placeholder="e.g., Previous knee injury..." + placeholderTextColor={theme.colors.gray400} + multiline + numberOfLines={3} + textAlignVertical="top" + /> + + + + + + {/* Save Button */} + + + + {loading ? ( + + ) : ( + <> + + Save Profile + + )} + + + - + ); } diff --git a/apps/mobile/src/app/personal-details.tsx b/apps/mobile/src/app/personal-details.tsx index 4ec3b51..4129e39 100644 --- a/apps/mobile/src/app/personal-details.tsx +++ b/apps/mobile/src/app/personal-details.tsx @@ -9,7 +9,7 @@ import { Alert, Platform, } from 'react-native'; -import { useRouter } from 'expo-router'; +import { useRouter, Stack } from 'expo-router'; import { useUser } from '@clerk/clerk-expo'; import { Ionicons } from '@expo/vector-icons'; import { LinearGradient } from 'expo-linear-gradient'; @@ -53,109 +53,112 @@ export default function PersonalDetailsScreen() { }; return ( - - {/* Header */} - - router.back()} + <> + + + {/* Header */} + - - - Personal Details - - - - - {/* First Name */} - - First Name * - - - updateField('firstName', value)} - placeholder="Enter first name" - placeholderTextColor={theme.colors.gray400} - /> - - - - {/* Last Name */} - - Last Name * - - - updateField('lastName', value)} - placeholder="Enter last name" - placeholderTextColor={theme.colors.gray400} - /> - - - - {/* Email (Read-only) */} - - Email - - - - - - Email cannot be changed here - - - {/* Phone (Read-only for now) */} - - Phone Number - - - - - - Phone number cannot be changed here - - - - {/* Save Button */} - - - router.back()} > - - - {loading ? 'Saving...' : 'Save Changes'} - - - + + + Personal Details + + + + + {/* First Name */} + + First Name * + + + updateField('firstName', value)} + placeholder="Enter first name" + placeholderTextColor={theme.colors.gray400} + /> + + + + {/* Last Name */} + + Last Name * + + + updateField('lastName', value)} + placeholder="Enter last name" + placeholderTextColor={theme.colors.gray400} + /> + + + + {/* Email (Read-only) */} + + Email + + + + + + Email cannot be changed here + + + {/* Phone (Read-only for now) */} + + Phone Number + + + + + + Phone number cannot be changed here + + + + {/* Save Button */} + + + + + + {loading ? 'Saving...' : 'Save Changes'} + + + + - + ); }