mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
19 lines
471 B
TypeScript
19 lines
471 B
TypeScript
"use client";
|
|
|
|
// components
|
|
import { UserLoggedIn } from "@/components/account";
|
|
import { LogoSpinner } from "@/components/common";
|
|
import { AuthView } from "@/components/views";
|
|
// hooks
|
|
import { useUser } from "@/hooks/store";
|
|
|
|
export default function HomePage() {
|
|
const { data: currentUser, isAuthenticated, isLoading } = useUser();
|
|
|
|
if (isLoading) return <LogoSpinner />;
|
|
|
|
if (currentUser && isAuthenticated) return <UserLoggedIn />;
|
|
|
|
return <AuthView />;
|
|
}
|