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

14
app/index.tsx Normal file
View file

@ -0,0 +1,14 @@
import React, { useEffect } from 'react'
import { Redirect } from 'expo-router'
import { useAuth } from './contexts/AuthContext'
export default function index() {
const {authState} = useAuth()
return (
<Redirect href={authState?.authenticated ? "/home/" : "/login"}></Redirect>
)
}