mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 08:09:33 +01:00
22 lines
535 B
TypeScript
22 lines
535 B
TypeScript
"use client";
|
|
|
|
import { observer } from "mobx-react";
|
|
// components
|
|
import { UserLoggedIn } from "@/components/account";
|
|
import { LogoSpinner } from "@/components/common";
|
|
import { AuthView } from "@/components/views";
|
|
// hooks
|
|
import { useUser } from "@/hooks/store";
|
|
|
|
const HomePage = observer(() => {
|
|
const { data: currentUser, isAuthenticated, isLoading } = useUser();
|
|
|
|
if (isLoading) return <LogoSpinner />;
|
|
|
|
if (currentUser && isAuthenticated) return <UserLoggedIn />;
|
|
|
|
return <AuthView />;
|
|
});
|
|
|
|
export default HomePage;
|