Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🚚 Rename new space dialog
Luke Vella4fcf216e6c1f
diff --git a/apps/web/src/features/spaces/components/new-space-dialog.tsx b/apps/web/src/features/spaces/components/create-space-dialog.tsxsimilarity index 91%rename from apps/web/src/features/spaces/components/new-space-dialog.tsxrename to apps/web/src/features/spaces/components/create-space-dialog.tsxindex a6b689fed..d090c780f 100644--- a/apps/web/src/features/spaces/components/new-space-dialog.tsx+++ b/apps/web/src/features/spaces/components/create-space-dialog.tsx@@ -27,17 +27,17 @@ import { createSpaceAction } from "@/features/spaces/actions";import { useTranslation } from "@/i18n/client";import { useSafeAction } from "@/lib/safe-action/client";-const newSpaceFormSchema = z.object({+const createSpaceFormSchema = z.object({name: z.string().min(1).max(100),});-type NewSpaceFormValues = z.infer<typeof newSpaceFormSchema>;+type CreateSpaceFormValues = z.infer<typeof createSpaceFormSchema>;-export function NewSpaceDialog({ children, ...props }: DialogProps) {+export function CreateSpaceDialog(props: DialogProps) {const { t } = useTranslation();- const form = useForm<NewSpaceFormValues>({- resolver: zodResolver(newSpaceFormSchema),+ const form = useForm<CreateSpaceFormValues>({+ resolver: zodResolver(createSpaceFormSchema),defaultValues: {name: "",},@@ -51,9 +51,8 @@ export function NewSpaceDialog({ children, ...props }: DialogProps) {return (<Dialog {...props}>- {children}<Form {...form}>- <DialogContent size="xs">+ <DialogContent size="sm"><DialogHeader><DialogTitle><Trans i18nKey="createSpace" defaults="Create Space" />diff --git a/apps/web/src/features/spaces/components/space-dropdown.tsx b/apps/web/src/features/spaces/components/space-dropdown.tsxindex b32a2a947..eb92c3c77 100644--- a/apps/web/src/features/spaces/components/space-dropdown.tsx+++ b/apps/web/src/features/spaces/components/space-dropdown.tsx@@ -18,7 +18,7 @@ import { ProBadge } from "@/components/pro-badge";import { Trans } from "@/components/trans";import { setActiveSpaceAction } from "@/features/spaces/actions";import { useSafeAction } from "@/lib/safe-action/client";-import { NewSpaceDialog } from "./new-space-dialog";+import { CreateSpaceDialog } from "./create-space-dialog";import { SpaceIcon } from "./space-icon";export function SpaceDropdown({@@ -74,7 +74,6 @@ export function SpaceDropdown({</DropdownMenuRadioItem>))}</DropdownMenuRadioGroup>- <DropdownMenuSeparator /><DropdownMenuItem onClick={newSpaceDialog.trigger}><Icon><CirclePlusIcon />@@ -92,7 +91,7 @@ export function SpaceDropdown({</DropdownMenuItem></DropdownMenuContent></DropdownMenu>- <NewSpaceDialog {...newSpaceDialog.dialogProps} />+ <CreateSpaceDialog {...newSpaceDialog.dialogProps} /></>);}