Initial commit

Generated by create-expo-app 3.3.0.
This commit is contained in:
Dennis Hundertmark
2025-04-03 08:58:19 +02:00
commit 6ed3300183
113 changed files with 22036 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { useAuth } from "@/utils/AuthProvider";
import { Redirect, Slot, useSegments } from "expo-router";
import React from "react";
import { StyleSheet } from "react-native";
const Layout = () => {
const { isAuthenticated } = useAuth();
const segments = useSegments();
const isAuthGroup = segments[1] === "(authenticated)";
if (!isAuthenticated && isAuthGroup) {
return <Redirect href="/" />;
}
return <Slot />;
};
export default Layout;
const styles = StyleSheet.create({});