project setup

This commit is contained in:
Sone
2025-11-02 10:08:56 +01:00
commit 568838003e
174 changed files with 27100 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import { Redirect, Stack } from "expo-router";
import { View } from "react-native";
import { useAuthContext } from "@/auth/AuthContext";
import { LoadingSpinner } from "@/components/ui/LoadingSpinner";
const AuthRoutesLayout = () => {
const { isAuthenticated, bootstrapping } = useAuthContext();
if (bootstrapping) {
return (
<View className="flex-1 p-5 bg-primaryPurpleLight">
<View
style={{ flex: 1, justifyContent: "center", alignItems: "center" }}
>
<LoadingSpinner />
</View>
</View>
);
}
if (isAuthenticated) {
return <Redirect href={"/"} />;
}
return <Stack screenOptions={{ headerShown: false }} />;
};
export default AuthRoutesLayout;