From 60b5a2e2db824856836739a8b41b49544fddb444 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Tue, 8 Oct 2024 17:41:00 +0200 Subject: [PATCH] feat: improve create project modal (#5646) --- .../src/components/layouts/organization.tsx | 44 ++++++++++++------- packages/web/app/src/components/ui/form.tsx | 18 ++------ packages/web/app/src/index.css | 4 +- packages/web/app/tailwind.config.cjs | 2 +- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/packages/web/app/src/components/layouts/organization.tsx b/packages/web/app/src/components/layouts/organization.tsx index e66d3ab79..fa58a6449 100644 --- a/packages/web/app/src/components/layouts/organization.tsx +++ b/packages/web/app/src/components/layouts/organization.tsx @@ -35,6 +35,7 @@ import { import { getIsStripeEnabled } from '@/lib/billing/stripe-public-key'; import { useToggle } from '@/lib/hooks'; import { useLastVisitedOrganizationWriter } from '@/lib/last-visited-org'; +import { cn } from '@/lib/utils'; import { zodResolver } from '@hookform/resolvers/zod'; import { Slot } from '@radix-ui/react-slot'; import { Link, useRouter } from '@tanstack/react-router'; @@ -226,6 +227,8 @@ export function OrganizationLayout({ organizationId={props.organizationId} isOpen={isModalOpen} toggleModalOpen={toggleModalOpen} + // reset the form every time it is closed + key={String(isModalOpen)} /> ) : null} @@ -382,20 +385,20 @@ export function CreateProjectModalContent(props: {
- - + + Create a project A Hive project represents a GraphQL API running a GraphQL schema. -
+
{ return ( - + Name of your project @@ -410,29 +413,38 @@ export function CreateProjectModalContent(props: { name="projectType" render={({ field }) => { return ( - - + + Project Type + } + title="Monolith" + description="Single GraphQL schema developed as a monolith" + icon={ + + } /> } + icon={ + + } /> } + icon={ + + } /> @@ -440,7 +452,7 @@ export function CreateProjectModalContent(props: { }} />
- +