From 396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b Mon Sep 17 00:00:00 2001 From: Fuwn <50817549+Fuwn@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:09:50 +0000 Subject: Initial commit Created from https://vercel.com/new --- src/app/(main)/websites/WebsiteAddForm.tsx | 60 ++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/app/(main)/websites/WebsiteAddForm.tsx (limited to 'src/app/(main)/websites/WebsiteAddForm.tsx') diff --git a/src/app/(main)/websites/WebsiteAddForm.tsx b/src/app/(main)/websites/WebsiteAddForm.tsx new file mode 100644 index 0000000..df17ad5 --- /dev/null +++ b/src/app/(main)/websites/WebsiteAddForm.tsx @@ -0,0 +1,60 @@ +import { Button, Form, FormField, FormSubmitButton, Row, TextField } from '@umami/react-zen'; +import { useMessages, useUpdateQuery } from '@/components/hooks'; +import { DOMAIN_REGEX } from '@/lib/constants'; + +export function WebsiteAddForm({ + teamId, + onSave, + onClose, +}: { + teamId?: string; + onSave?: () => void; + onClose?: () => void; +}) { + const { formatMessage, labels, messages } = useMessages(); + const { mutateAsync, error, isPending } = useUpdateQuery('/websites', { teamId }); + + const handleSubmit = async (data: any) => { + await mutateAsync(data, { + onSuccess: async () => { + onSave?.(); + onClose?.(); + }, + }); + }; + + return ( +
+ + + + + + + + + {onClose && ( + + )} + + {formatMessage(labels.save)} + + +
+ ); +} -- cgit v1.2.3