mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
16 lines
354 B
TypeScript
16 lines
354 B
TypeScript
import { Redirect } from "expo-router"
|
|
|
|
import { useAuthentication } from "@/presentation/react/contexts/Authentication"
|
|
|
|
const HomePage: React.FC = () => {
|
|
const { user } = useAuthentication()
|
|
|
|
if (user == null) {
|
|
return <Redirect href="/authentication/login" />
|
|
}
|
|
|
|
return <Redirect href="/application/habits/" />
|
|
}
|
|
|
|
export default HomePage
|