1
1
mirror of https://github.com/theoludwig/p61-project.git synced 2024-07-17 07:00:12 +02:00
p61-project/app/(pages)/index.tsx

16 lines
369 B
TypeScript
Raw Normal View History

import { Redirect } from "expo-router"
import { useAuthentication } from "@/presentation/react/contexts/Authentication"
2024-02-16 22:51:50 +01:00
const HomePage: React.FC = () => {
const { user } = useAuthentication()
2024-02-16 22:51:50 +01:00
if (user == null) {
return <Redirect href="/(pages)/authentication/login" />
}
return <Redirect href="/(pages)/application/habits" />
}
2024-02-16 22:51:50 +01:00
export default HomePage