plane/apps/app/pages/create-workspace.tsx
Aaryan Khandelwal 1026ae3eb1
chore: user auth layer (#749)
* chore: use estimate points hook created

* chore: user auth layer

* fix: build error
2023-04-08 18:05:54 +05:30

45 lines
1.2 KiB
TypeScript

import React from "react";
import { useRouter } from "next/router";
import Image from "next/image";
// layouts
import DefaultLayout from "layouts/default-layout";
import { UserAuthorizationLayout } from "layouts/auth-layout/user-authorization-wrapper";
// images
import Logo from "public/onboarding/logo.svg";
// types
import type { NextPage } from "next";
// constants
import { CreateWorkspaceForm } from "components/workspace";
const CreateWorkspace: NextPage = () => {
const router = useRouter();
const defaultValues = {
name: "",
slug: "",
company_size: null,
};
return (
<UserAuthorizationLayout>
<DefaultLayout>
<div className="grid h-full place-items-center p-5">
<div className="w-full space-y-4">
<div className="mb-8 text-center">
<Image src={Logo} height="50" alt="Plane Logo" />
</div>
<CreateWorkspaceForm
defaultValues={defaultValues}
setDefaultValues={() => {}}
onSubmit={(res) => router.push(`/${res.slug}`)}
/>
</div>
</div>
</DefaultLayout>
</UserAuthorizationLayout>
);
};
export default CreateWorkspace;