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

Create your workspace

); }); export default CreateWorkspacePage;