import React, { useState, ReactElement } from "react"; import { useRouter } from "next/router"; import Image from "next/image"; import { useTheme } from "next-themes"; import { observer } from "mobx-react-lite"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // layouts import DefaultLayout from "layouts/default-layout"; import { UserAuthWrapper } from "layouts/auth-layout"; // components import { CreateWorkspaceForm } from "components/workspace"; // images 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 import { IWorkspace } from "types"; import { NextPageWithLayout } from "types/app"; const CreateWorkspacePage: NextPageWithLayout = observer(() => { // router const router = useRouter(); // store const { user: { currentUser, updateCurrentUser }, } = useMobxStore(); // 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 (
{currentUser?.email}

Create your workspace

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