Loading backend/backend.code-workspace 0 → 100644 +9 −0 Original line number Diff line number Diff line { "folders": [ { "name": "backend", "path": "." } ], "settings": {} } mobile/app/(tabs)/_layout.tsx +10 −6 Original line number Diff line number Diff line Loading @@ -7,16 +7,20 @@ import { useTranslation } from "react-i18next"; import { useSetUp } from "../../src/common/contexts/set_up_context"; export default function Layout() { const { user } = useAuth(); const { user, isVerified } = useAuth(); const { isFirstTime } = useSetUp(); const LANG = useTranslation(); console.log(user); if (!user) { return <Redirect href={'/login'}/>; return <Redirect href={"/login"} />; } if (!isVerified) { return <Redirect href={"/verify"} />; } if (isFirstTime) { return <Redirect href={'/profile/set_up'}/>; return <Redirect href={"/profile/set_up"} />; } return ( Loading mobile/app/_layout.tsx +22 −3 Original line number Diff line number Diff line Loading @@ -8,9 +8,12 @@ import { import { ActivityIndicator } from "react-native"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import { AudioContextProvider } from "../src/common/contexts/audio_context"; import { I18nextProvider } from "react-i18next"; import { I18nextProvider, useTranslation } from "react-i18next"; import i18n from "../src/lang/translations"; import { SetUpContextProvider, useSetUp } from "../src/common/contexts/set_up_context"; import { SetUpContextProvider, useSetUp, } from "../src/common/contexts/set_up_context"; export default function Root() { return ( Loading @@ -32,6 +35,7 @@ export default function Root() { const MainLayout = () => { const { isLoading } = useAuth(); const { t } = useTranslation(); if (isLoading) { return <ActivityIndicator />; Loading Loading @@ -76,7 +80,7 @@ const MainLayout = () => { <Stack.Screen name="scan" options={{ title: "Scan", title: t("scanScreen.title"), statusBarColor: LIGHT_THEME.color.primary, headerStyle: { backgroundColor: LIGHT_THEME.color.primary, Loading Loading @@ -117,6 +121,21 @@ const MainLayout = () => { statusBarColor: LIGHT_THEME.color.primary, }} /> <Stack.Screen name="routes/generate_route_form" options={{ title: t("generateRouteScreen.title"), statusBarColor: LIGHT_THEME.color.primary, headerStyle: { backgroundColor: LIGHT_THEME.color.primary, }, headerTitleStyle: { color: LIGHT_THEME.color.white, }, headerTitleAlign: "center", headerTintColor: LIGHT_THEME.color.white, }} /> <Stack.Screen name="auth/reset_password" options={{ Loading mobile/app/state/[stateId]/town/_layout.tsx +27 −19 Original line number Diff line number Diff line import { Stack } from "expo-router"; import { LIGHT_THEME } from "../../../../src/common/const/theme"; import { useTranslation } from "react-i18next"; export default function Layout() { const { t } = useTranslation(); return ( <Stack> <Stack.Screen name="[townId]/index" options={{ title: "Select an activity", <Stack.Screen name="[townId]/index" options={{ title: t("selectTownActivityScreen.title"), headerStyle: { backgroundColor: LIGHT_THEME.color.primary, }, Loading @@ -14,10 +18,14 @@ export default function Layout() { }, headerTitleAlign: "center", headerTintColor: LIGHT_THEME.color.white, }}/> <Stack.Screen name="[townId]/activity" options={{ headerShown: false }}/> }} /> <Stack.Screen name="[townId]/activity" options={{ headerShown: false, }} /> </Stack> ); } mobile/app/state/_layout.tsx +3 −1 Original line number Diff line number Diff line import { Stack } from "expo-router"; import { LIGHT_THEME } from "../../src/common/const/theme"; import { useTranslation } from "react-i18next"; export default function Layout() { const { t } = useTranslation(); return ( <Stack> <Stack.Screen name="[stateId]/index" options={{ title: "Select a town", title: t("selectTownScreen.title"), headerStyle: { backgroundColor: LIGHT_THEME.color.primary, }, Loading Loading
backend/backend.code-workspace 0 → 100644 +9 −0 Original line number Diff line number Diff line { "folders": [ { "name": "backend", "path": "." } ], "settings": {} }
mobile/app/(tabs)/_layout.tsx +10 −6 Original line number Diff line number Diff line Loading @@ -7,16 +7,20 @@ import { useTranslation } from "react-i18next"; import { useSetUp } from "../../src/common/contexts/set_up_context"; export default function Layout() { const { user } = useAuth(); const { user, isVerified } = useAuth(); const { isFirstTime } = useSetUp(); const LANG = useTranslation(); console.log(user); if (!user) { return <Redirect href={'/login'}/>; return <Redirect href={"/login"} />; } if (!isVerified) { return <Redirect href={"/verify"} />; } if (isFirstTime) { return <Redirect href={'/profile/set_up'}/>; return <Redirect href={"/profile/set_up"} />; } return ( Loading
mobile/app/_layout.tsx +22 −3 Original line number Diff line number Diff line Loading @@ -8,9 +8,12 @@ import { import { ActivityIndicator } from "react-native"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import { AudioContextProvider } from "../src/common/contexts/audio_context"; import { I18nextProvider } from "react-i18next"; import { I18nextProvider, useTranslation } from "react-i18next"; import i18n from "../src/lang/translations"; import { SetUpContextProvider, useSetUp } from "../src/common/contexts/set_up_context"; import { SetUpContextProvider, useSetUp, } from "../src/common/contexts/set_up_context"; export default function Root() { return ( Loading @@ -32,6 +35,7 @@ export default function Root() { const MainLayout = () => { const { isLoading } = useAuth(); const { t } = useTranslation(); if (isLoading) { return <ActivityIndicator />; Loading Loading @@ -76,7 +80,7 @@ const MainLayout = () => { <Stack.Screen name="scan" options={{ title: "Scan", title: t("scanScreen.title"), statusBarColor: LIGHT_THEME.color.primary, headerStyle: { backgroundColor: LIGHT_THEME.color.primary, Loading Loading @@ -117,6 +121,21 @@ const MainLayout = () => { statusBarColor: LIGHT_THEME.color.primary, }} /> <Stack.Screen name="routes/generate_route_form" options={{ title: t("generateRouteScreen.title"), statusBarColor: LIGHT_THEME.color.primary, headerStyle: { backgroundColor: LIGHT_THEME.color.primary, }, headerTitleStyle: { color: LIGHT_THEME.color.white, }, headerTitleAlign: "center", headerTintColor: LIGHT_THEME.color.white, }} /> <Stack.Screen name="auth/reset_password" options={{ Loading
mobile/app/state/[stateId]/town/_layout.tsx +27 −19 Original line number Diff line number Diff line import { Stack } from "expo-router"; import { LIGHT_THEME } from "../../../../src/common/const/theme"; import { useTranslation } from "react-i18next"; export default function Layout() { const { t } = useTranslation(); return ( <Stack> <Stack.Screen name="[townId]/index" options={{ title: "Select an activity", <Stack.Screen name="[townId]/index" options={{ title: t("selectTownActivityScreen.title"), headerStyle: { backgroundColor: LIGHT_THEME.color.primary, }, Loading @@ -14,10 +18,14 @@ export default function Layout() { }, headerTitleAlign: "center", headerTintColor: LIGHT_THEME.color.white, }}/> <Stack.Screen name="[townId]/activity" options={{ headerShown: false }}/> }} /> <Stack.Screen name="[townId]/activity" options={{ headerShown: false, }} /> </Stack> ); }
mobile/app/state/_layout.tsx +3 −1 Original line number Diff line number Diff line import { Stack } from "expo-router"; import { LIGHT_THEME } from "../../src/common/const/theme"; import { useTranslation } from "react-i18next"; export default function Layout() { const { t } = useTranslation(); return ( <Stack> <Stack.Screen name="[stateId]/index" options={{ title: "Select a town", title: t("selectTownScreen.title"), headerStyle: { backgroundColor: LIGHT_THEME.color.primary, }, Loading