2024-05-01 13:28:01 +00:00
|
|
|
import React from "react";
|
2024-04-29 06:42:33 +00:00
|
|
|
import { observer } from "mobx-react";
|
|
|
|
import Image from "next/image";
|
|
|
|
import Link from "next/link";
|
|
|
|
// ui
|
|
|
|
import { useTheme } from "next-themes";
|
|
|
|
// components
|
2024-04-30 11:34:49 +00:00
|
|
|
import { SignUpAuthRoot } from "@/components/account";
|
2024-04-29 06:42:33 +00:00
|
|
|
import { PageHead } from "@/components/core";
|
|
|
|
// constants
|
|
|
|
import { NAVIGATE_TO_SIGNIN } from "@/constants/event-tracker";
|
|
|
|
// hooks
|
2024-05-01 13:28:01 +00:00
|
|
|
import { useEventTracker } from "@/hooks/store";
|
2024-04-29 06:42:33 +00:00
|
|
|
// 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 { captureEvent } = useEventTracker();
|
|
|
|
// hooks
|
|
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
// login redirection hook
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="relative">
|
|
|
|
<PageHead title="Sign Up" />
|
|
|
|
<div className="absolute inset-0 z-0">
|
2024-04-29 17:42:43 +00:00
|
|
|
<Image
|
2024-04-29 06:42:33 +00:00
|
|
|
src={resolvedTheme === "dark" ? PlaneBackgroundPatternDark : PlaneBackgroundPattern}
|
|
|
|
className="w-screen min-h-screen object-cover"
|
|
|
|
alt="Plane background pattern"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="relative z-10">
|
|
|
|
<div className="flex items-center justify-between px-8 pb-4 sm:px-16 sm:py-5 lg:px-28">
|
|
|
|
<div className="flex items-center gap-x-2 py-10">
|
|
|
|
<Image src={BluePlaneLogoWithoutText} height={30} width={30} alt="Plane Logo" className="mr-2" />
|
|
|
|
<span className="text-2xl font-semibold sm:text-3xl">Plane</span>
|
|
|
|
</div>
|
|
|
|
<div className="text-center text-sm font-medium text-onboarding-text-300">
|
|
|
|
Already have an account?{" "}
|
|
|
|
<Link
|
|
|
|
href="/accounts/sign-in"
|
|
|
|
onClick={() => captureEvent(NAVIGATE_TO_SIGNIN, {})}
|
|
|
|
className="font-semibold text-custom-primary-100 hover:underline"
|
|
|
|
>
|
|
|
|
Sign In
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mx-auto h-full">
|
|
|
|
<div className="h-full overflow-auto px-7 pb-56 pt-4 sm:px-0">
|
2024-04-30 11:34:49 +00:00
|
|
|
<SignUpAuthRoot />
|
2024-04-29 06:42:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|