diff --git a/mobile/App.tsx b/mobile/App.tsx index 0329d0c93c3a2f575e4d87faeea9b6029d400ef1..1f2524956405f01b2efd04ba0567f9d36f9358cc 100644 --- a/mobile/App.tsx +++ b/mobile/App.tsx @@ -1,12 +1,13 @@ import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View } from 'react-native'; +import { StateSelectionPage } from './src/screens/state_selection/state_selection_page'; +import { DataContextProvider } from './src/contexts/data_context'; export default function App() { return ( - - Open up App.tsx to start working on your app! - - + + + ); } diff --git a/mobile/app.json b/mobile/app.json index 2cabcf6a585a6c45149f25d728cda97b3d88f816..69fc5a602dda22f61f9f4077ebdbaddc04690f80 100644 --- a/mobile/app.json +++ b/mobile/app.json @@ -1,6 +1,7 @@ { "expo": { - "name": "mobile", + "name": "pueblos-magicos", + "scheme": "myapp", "slug": "mobile", "version": "1.0.0", "orientation": "portrait", @@ -21,10 +22,23 @@ "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#ffffff" - } + }, + "package": "com.lorenzotrujillo.mobile" }, "web": { "favicon": "./assets/favicon.png" + }, + "plugins": [ + "expo-router", + "expo-secure-store" + ], + "extra": { + "router": { + "origin": false + }, + "eas": { + "projectId": "e886fd36-a509-4844-bc03-c722bb61a245" + } } } } diff --git a/mobile/app/(modal)/[id].tsx b/mobile/app/(modal)/[id].tsx new file mode 100644 index 0000000000000000000000000000000000000000..10b634af72befe858588698ddb01065b09a4cb95 --- /dev/null +++ b/mobile/app/(modal)/[id].tsx @@ -0,0 +1,16 @@ +import { View, Text } from "react-native"; +import { TownSelectionPage } from "../../src/screens/town_selection/town_selection_page"; +import { useLocalSearchParams } from "expo-router"; +import { FullPageLoader } from "../../src/components/full_page_loader/full_page_loader"; + +export default function Main () { + const { id } = useLocalSearchParams<{ id: string }>(); + if (!id) { + return ( + + ); + } + return ( + + ); +} \ No newline at end of file diff --git a/mobile/app/(tabs)/_layout.tsx b/mobile/app/(tabs)/_layout.tsx new file mode 100644 index 0000000000000000000000000000000000000000..55ed70f32f84cf80dee8f4a668bb71c3dfa6f51c --- /dev/null +++ b/mobile/app/(tabs)/_layout.tsx @@ -0,0 +1,61 @@ +import { Redirect, Tabs } from "expo-router"; +import { Ionicons } from "@expo/vector-icons"; +import { FontAwesome5 } from "@expo/vector-icons"; +import { LIGTHT_THEME } from "../../src/constants/theme"; +import { useAuth } from "../../src/contexts/auth_context"; + +export default function Layout() { + const { user } = useAuth(); + console.log(user); + if (!user) { + return ; + } + + return ( + + { + if (focused) { + return ; + } + return ; + }, + }} + /> + { + if (focused) { + return ; + } + return ; + }, + }} + /> + { + if (focused) { + return ; + } + return ; + }, + }} + /> + + ); +} diff --git a/mobile/app/(tabs)/account.tsx b/mobile/app/(tabs)/account.tsx new file mode 100644 index 0000000000000000000000000000000000000000..64a31b2656e51ef36c81e9b7ed4d375ac42bb46c --- /dev/null +++ b/mobile/app/(tabs)/account.tsx @@ -0,0 +1,7 @@ +import { AccountPage } from "../../src/screens/account/account_page"; + +export default function AccountScreen() { + return ( + + ); +} \ No newline at end of file diff --git a/mobile/app/(tabs)/index.tsx b/mobile/app/(tabs)/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..9c27cc41088bc8b8aa55884c331e0e26f3b1ac82 --- /dev/null +++ b/mobile/app/(tabs)/index.tsx @@ -0,0 +1,7 @@ +import { DataContextProvider } from '../../src/contexts/data_context'; +import { StateSelectionPage } from '../../src/screens/state_selection/state_selection_page'; +export default function Main () { + return ( + + ); +}; \ No newline at end of file diff --git a/mobile/app/(tabs)/travel_history.tsx b/mobile/app/(tabs)/travel_history.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2416e829975cee925257c510ad938654f0a465b0 --- /dev/null +++ b/mobile/app/(tabs)/travel_history.tsx @@ -0,0 +1,9 @@ +import { View } from "react-native"; + +export default function TravelHistoryScreen() { + return ( + + + + ); +} \ No newline at end of file diff --git a/mobile/app/_layout.tsx b/mobile/app/_layout.tsx new file mode 100644 index 0000000000000000000000000000000000000000..0f888a4299603b9843ed97d426e166150d8f127c --- /dev/null +++ b/mobile/app/_layout.tsx @@ -0,0 +1,49 @@ +import { Stack, Tabs } from "expo-router"; +import { DataContextProvider } from "../src/contexts/data_context"; +import { LIGTHT_THEME } from "../src/constants/theme"; +import { AuthContextProvider, useAuth } from "../src/contexts/auth_context"; +import { ActivityIndicator } from "react-native"; + +export default function Root() { + return + + + + ; +} + +const MainLayout = () => { + const { isLoading } = useAuth(); + + if (isLoading) { + return ; + } + + return ( + + + + + + + ); +}; diff --git a/mobile/app/login.tsx b/mobile/app/login.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d574b54332899c8146da2303ea23f71130ec3579 --- /dev/null +++ b/mobile/app/login.tsx @@ -0,0 +1,9 @@ +import { LoginPage } from "../src/screens/login/login_page"; + +const LoginScreen = () => { + return ( + + ); +}; + +export default LoginScreen; diff --git a/mobile/app/sign_up.tsx b/mobile/app/sign_up.tsx new file mode 100644 index 0000000000000000000000000000000000000000..236776dbd566288ab8011409dccbb8ed64334d12 --- /dev/null +++ b/mobile/app/sign_up.tsx @@ -0,0 +1,64 @@ +import { View, StyleSheet, Image, Text, Button } from "react-native"; +import { LIGTHT_THEME } from "../src/constants/theme"; +import { SignUpForm } from "../src/components/sign_up_form/sign_up_form"; +import { router } from "expo-router"; +const loginImage = require("../assets/login-image.jpg"); + +const SignUp = () => { + return ( + + + + + + +