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

@@ -1,10 +1,20 @@
import { ButtonForm } from "@/components/buttonForm";
import { InputForm } from "@/components/inputForm";
import Styles from "@/constants/Styles";
import { router } from "expo-router";
import { useAuthSession } from "@/providers/AuthProvider";
import { Redirect, router } from "expo-router";
import { Image, Text, View } from "react-native";
export default function Index() {
const { token, isLoading } = useAuthSession()
if (isLoading) {
return <Text>Loading...</Text>;
}
if (token?.current) {
return <Redirect href="/home" />;
}
return (
<View style={Styles.wrapLogin} >
<View style={{ alignItems: "center", marginVertical: 50 }}>