upd: login

Deskripsi:
- login token
- logout

No Issues
This commit is contained in:
amel
2025-04-09 17:45:51 +08:00
parent 654dc4e340
commit 823b892a7c
9 changed files with 12731 additions and 13 deletions

View File

@@ -4,10 +4,22 @@ import HeaderRightDivisionList from "@/components/division/headerDivisionList";
import HeaderMemberList from "@/components/member/headerMemberList";
import HeaderRightProjectList from "@/components/project/headerProjectList";
import { Headers } from "@/constants/Headers";
import { router, Stack } from "expo-router";
import { useAuthSession } from "@/providers/AuthProvider";
import { Redirect, router, Stack } from "expo-router";
import { StatusBar } from 'expo-status-bar';
import { Text } from "react-native";
export default function RootLayout() {
const { token, isLoading } = useAuthSession()
if (isLoading) {
return <Text>Loading...</Text>;
}
if (!token?.current) {
return <Redirect href="/" />;
}
return (
<>
<Stack screenOptions={Headers.shadow}>