From 8732b527def3d36a30050f9ad1e362d7a0cca8ff Mon Sep 17 00:00:00 2001 From: Gerard Clos Date: Mon, 9 Sep 2024 12:48:03 +0200 Subject: [PATCH] minor: added default parameters in setup page --- .../src/app/(public)/setup/SetupForm/index.tsx | 15 ++++++++++++++- apps/web/src/app/(public)/setup/page.tsx | 13 +++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/(public)/setup/SetupForm/index.tsx b/apps/web/src/app/(public)/setup/SetupForm/index.tsx index 35ee37009..3dc0cb575 100644 --- a/apps/web/src/app/(public)/setup/SetupForm/index.tsx +++ b/apps/web/src/app/(public)/setup/SetupForm/index.tsx @@ -6,7 +6,17 @@ import { Button, FormWrapper, Input, useToast } from '@latitude-data/web-ui' import { setupAction } from '$/actions/user/setupAction' import { useServerAction } from 'zsa-react' -export default function SetupForm({ footer }: { footer: ReactNode }) { +export default function SetupForm({ + email, + name, + companyName, + footer, +}: { + email?: string + name?: string + companyName?: string + footer: ReactNode +}) { const { toast } = useToast() const { isPending, error, executeFormAction } = useServerAction(setupAction, { onError: ({ err }) => { @@ -30,6 +40,7 @@ export default function SetupForm({ footer }: { footer: ReactNode }) { label='Name' placeholder='Jon Snow' errors={errors?.name} + defaultValue={name} />