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