import React, { useEffect } from "react"; import { observer } from "mobx-react"; import Image from "next/image"; import Link from "next/link"; // ui import { useTheme } from "next-themes"; import { Spinner } from "@plane/ui"; // components import { SignUpAuthRoot } from "@/components/account"; import { PageHead } from "@/components/core"; // constants import { NAVIGATE_TO_SIGNIN } from "@/constants/event-tracker"; // hooks import { useEventTracker, useInstance, useUser } from "@/hooks/store"; import useAuthRedirection from "@/hooks/use-auth-redirection"; // types // assets import PlaneBackgroundPatternDark from "public/onboarding/background-pattern-dark.svg"; import PlaneBackgroundPattern from "public/onboarding/background-pattern.svg"; import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png"; export const SignUpView = observer(() => { // store hooks const { instance } = useInstance(); const { data: currentUser } = useUser(); const { captureEvent } = useEventTracker(); // hooks const { resolvedTheme } = useTheme(); // login redirection hook const { isRedirecting, handleRedirection } = useAuthRedirection(); useEffect(() => { handleRedirection(); }, [handleRedirection]); if (isRedirecting || currentUser || !instance?.config) return (
); return (
Plane background pattern
Plane Logo Plane
Already have an account?{" "} captureEvent(NAVIGATE_TO_SIGNIN, {})} className="font-semibold text-custom-primary-100 hover:underline" > Sign In
); });