feat: introduced Authentification Context

This commit is contained in:
Jakob Stornig 2023-12-08 14:51:05 +01:00
parent 7c9fdad01f
commit 6592864bc4
9 changed files with 215 additions and 16 deletions

22
app/login.tsx Normal file
View file

@ -0,0 +1,22 @@
import { View, Text } from 'react-native'
import React, { useEffect } from 'react'
import { useAuth } from './contexts/AuthContext'
import { Redirect } from 'expo-router';
export default function login() {
const {authState, onLogin} = useAuth();
useEffect(() => {
login()
}, [])
const login = async() => {
onLogin!("test", "test");
}
return (
<View>
<Text>login</Text>
<Redirect href={"/"}></Redirect>
</View>
)
}