From aa232630885a60f4b2994a13ad1a2a305e98e19f Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 6 Feb 2026 10:38:47 -0500 Subject: [PATCH 1/3] Added bulk changes, pending fix for cookie parse issue --- app.json | 3 +- app/(tabs)/_layout.tsx | 45 - app/(tabs)/explore.tsx | 39 - app/(tabs)/index.tsx | 44 - app/+not-found.tsx | 32 - app/_layout.tsx | 35 +- app/home.tsx | 47 + app/index.tsx | 5 + app/login.tsx | 74 + components/Collapsible.tsx | 45 - components/ExternalLink.tsx | 24 - components/HapticTab.tsx | 18 - components/HelloWave.tsx | 40 - components/PageWrapper.tsx | 15 + components/ParallaxScrollView.tsx | 82 -- components/buttons/Button.tsx | 33 + components/hooks/AuthContext.tsx | 118 ++ components/hooks/useAsyncStorage.ts | 24 + components/styles/styles.ts | 21 + components/ui/IconSymbol.ios.tsx | 32 - components/ui/IconSymbol.tsx | 41 - components/ui/TabBarBackground.ios.tsx | 19 - components/ui/TabBarBackground.tsx | 6 - index.js | 49 + package-lock.json | 1817 ++++++++++++------------ package.json | 37 +- 26 files changed, 1384 insertions(+), 1361 deletions(-) delete mode 100644 app/(tabs)/_layout.tsx delete mode 100644 app/(tabs)/explore.tsx delete mode 100644 app/(tabs)/index.tsx delete mode 100644 app/+not-found.tsx create mode 100644 app/home.tsx create mode 100644 app/index.tsx create mode 100644 app/login.tsx delete mode 100644 components/Collapsible.tsx delete mode 100644 components/ExternalLink.tsx delete mode 100644 components/HapticTab.tsx delete mode 100644 components/HelloWave.tsx create mode 100644 components/PageWrapper.tsx delete mode 100644 components/ParallaxScrollView.tsx create mode 100644 components/buttons/Button.tsx create mode 100644 components/hooks/AuthContext.tsx create mode 100644 components/hooks/useAsyncStorage.ts create mode 100644 components/styles/styles.ts delete mode 100644 components/ui/IconSymbol.ios.tsx delete mode 100644 components/ui/IconSymbol.tsx delete mode 100644 components/ui/TabBarBackground.ios.tsx delete mode 100644 components/ui/TabBarBackground.tsx create mode 100644 index.js diff --git a/app.json b/app.json index 7fa6261..df7ebdc 100644 --- a/app.json +++ b/app.json @@ -33,7 +33,8 @@ "resizeMode": "contain", "backgroundColor": "#ffffff" } - ] + ], + "expo-web-browser" ], "experiments": { "typedRoutes": true diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx deleted file mode 100644 index cfbc1e2..0000000 --- a/app/(tabs)/_layout.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { Tabs } from 'expo-router'; -import React from 'react'; -import { Platform } from 'react-native'; - -import { HapticTab } from '@/components/HapticTab'; -import { IconSymbol } from '@/components/ui/IconSymbol'; -import TabBarBackground from '@/components/ui/TabBarBackground'; -import { Colors } from '@/constants/Colors'; -import { useColorScheme } from '@/hooks/useColorScheme'; - -export default function TabLayout() { - const colorScheme = useColorScheme(); - - return ( - - , - }} - /> - , - }} - /> - - ); -} diff --git a/app/(tabs)/explore.tsx b/app/(tabs)/explore.tsx deleted file mode 100644 index 5f472c7..0000000 --- a/app/(tabs)/explore.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { StyleSheet } from 'react-native'; - -import ParallaxScrollView from '@/components/ParallaxScrollView'; -import { ThemedText } from '@/components/ThemedText'; -import { ThemedView } from '@/components/ThemedView'; -import { IconSymbol } from '@/components/ui/IconSymbol'; - -export default function TabTwoScreen() { - return ( - - }> - - Explore - - 🚧 This section of the app is under construction 🚧 - - ); -} - -const styles = StyleSheet.create({ - headerImage: { - color: '#808080', - bottom: -90, - left: -35, - position: 'absolute', - }, - titleContainer: { - flexDirection: 'row', - gap: 8, - }, -}); diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx deleted file mode 100644 index 1081e2a..0000000 --- a/app/(tabs)/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Image } from 'expo-image'; -import { StyleSheet } from 'react-native'; - -import { HelloWave } from '@/components/HelloWave'; -import ParallaxScrollView from '@/components/ParallaxScrollView'; -import { ThemedText } from '@/components/ThemedText'; -import { ThemedView } from '@/components/ThemedView'; - -export default function HomeScreen() { - return ( - - }> - - Welcome to Experient! - - - - ); -} - -const styles = StyleSheet.create({ - titleContainer: { - flexDirection: 'row', - alignItems: 'center', - gap: 8, - }, - stepContainer: { - gap: 8, - marginBottom: 8, - }, - reactLogo: { - height: 178, - width: 290, - bottom: 0, - left: 0, - position: 'absolute', - }, -}); diff --git a/app/+not-found.tsx b/app/+not-found.tsx deleted file mode 100644 index 215b0ed..0000000 --- a/app/+not-found.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { Link, Stack } from 'expo-router'; -import { StyleSheet } from 'react-native'; - -import { ThemedText } from '@/components/ThemedText'; -import { ThemedView } from '@/components/ThemedView'; - -export default function NotFoundScreen() { - return ( - <> - - - This screen does not exist. - - Go to home screen! - - - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - padding: 20, - }, - link: { - marginTop: 15, - paddingVertical: 15, - }, -}); diff --git a/app/_layout.tsx b/app/_layout.tsx index 8d506f7..6574788 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -4,7 +4,10 @@ import { Stack } from 'expo-router'; import { StatusBar } from 'expo-status-bar'; import 'react-native-reanimated'; +import { AuthProvider, useAuth } from '@/components/hooks/AuthContext'; +import { sharedStyles } from '@/components/styles/styles'; import { useColorScheme } from '@/hooks/useColorScheme'; +import { SafeAreaView } from 'react-native-safe-area-context'; export default function RootLayout() { const colorScheme = useColorScheme(); @@ -18,12 +21,30 @@ export default function RootLayout() { } return ( - - - - - - - + + + + + + + + ); } + +const options = { headerShown: false }; +const RootNavigator = () => { + const { isLoggedIn } = useAuth(); + // const isLoggedIn = true; + console.log('AppStack isLoggedIn', isLoggedIn) + return ( + + + + + + + + + ) +} \ No newline at end of file diff --git a/app/home.tsx b/app/home.tsx new file mode 100644 index 0000000..607810f --- /dev/null +++ b/app/home.tsx @@ -0,0 +1,47 @@ +import { StyleSheet } from 'react-native'; + +import PageWrapper from '@/components/PageWrapper'; +import { ThemedText } from '@/components/ThemedText'; +import { ThemedView } from '@/components/ThemedView'; +import { Button } from '@/components/buttons/Button'; +import { useAuth } from '@/components/hooks/AuthContext'; + +const dailyAffirmations = [ + "You are a thoughtful and well liked individual.", + "You look fantastic today!", + "Everyone is so proud of you!" +]; + +const getAffirmation = () => { + const randomInt = Math.floor(Math.random() * dailyAffirmations.length ); + return dailyAffirmations[randomInt]; +} + +export default function HomeScreen() { + const {logout} = useAuth(); + + const handleLogout = async () => { + logout(); + }; + + + return ( + + + Home + + + {getAffirmation()} + +