mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
20 lines
562 B
TypeScript
20 lines
562 B
TypeScript
// mobx
|
|
import { observer } from "mobx-react-lite";
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
|
// components
|
|
import { SignInView, UserLoggedIn } from "components/accounts";
|
|
|
|
export const LoginView = observer(() => {
|
|
const { user: userStore } = useMobxStore();
|
|
|
|
return (
|
|
<>
|
|
{userStore?.loader ? (
|
|
<div className="relative flex h-screen w-screen items-center justify-center">Loading</div> // TODO: Add spinner instead
|
|
) : (
|
|
<>{userStore.currentUser ? <UserLoggedIn /> : <SignInView />}</>
|
|
)}
|
|
</>
|
|
);
|
|
});
|