feat: introduced Authentification Context
This commit is contained in:
parent
7c9fdad01f
commit
6592864bc4
9 changed files with 215 additions and 16 deletions
22
app/login.tsx
Normal file
22
app/login.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in a new issue