upd: login
Deskripsi: - login token - logout No Issues
This commit is contained in:
@@ -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 }}>
|
||||
|
||||
Reference in New Issue
Block a user