import { ReactElement, useState } from "react"; import { observer } from "mobx-react"; import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/router"; import { useTheme } from "next-themes"; import { IWorkspace } from "@plane/types"; // hooks import { PageHead } from "@/components/core"; import { CreateWorkspaceForm } from "@/components/workspace"; import { useUser } from "@/hooks/store"; // layouts import DefaultLayout from "@/layouts/default-layout"; // components // images import { NextPageWithLayout } from "@/lib/types"; // wrappers import { AuthenticationWrapper } from "@/lib/wrappers"; import BlackHorizontalLogo from "public/plane-logos/black-horizontal-with-blue-logo.svg"; import WhiteHorizontalLogo from "public/plane-logos/white-horizontal-with-blue-logo.svg"; // types const CreateWorkspacePage: NextPageWithLayout = observer(() => { // router const router = useRouter(); // store hooks const { data: currentUser } = useUser(); const { updateCurrentUser } = useUser(); // states const [defaultValues, setDefaultValues] = useState({ name: "", slug: "", organization_size: "", }); // hooks const { theme } = useTheme(); const onSubmit = async (workspace: IWorkspace) => { await updateCurrentUser({ last_workspace_id: workspace.id }).then(() => router.push(`/${workspace.slug}`)); }; return ( <>
{theme === "light" ? ( Plane black logo ) : ( Plane white logo )}
{currentUser?.email}

Create your workspace

); }); CreateWorkspacePage.getLayout = function getLayout(page: ReactElement) { return ( {page} ); }; export default CreateWorkspacePage;