import { useEffect } from "react"; import { observer } from "mobx-react-lite"; import Image from "next/image"; // hooks import { useApplication, useUser } from "hooks/store"; import useSignInRedirection from "hooks/use-sign-in-redirection"; // components import { SignInRoot } from "components/account"; // ui import { Spinner } from "@plane/ui"; // images import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png"; export type AuthType = "sign-in" | "sign-up"; export const SignInView = observer(() => { // store hooks const { config: { envConfig }, } = useApplication(); const { currentUser } = useUser(); // sign in redirection hook const { isRedirecting, handleRedirection } = useSignInRedirection(); useEffect(() => { handleRedirection(); }, [handleRedirection]); if (isRedirecting || currentUser || !envConfig) return (