From 908f4491d415e2bb1268ed46190fa9569c47f017 Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Tue, 29 Oct 2024 21:19:58 +0100 Subject: [PATCH] set date of birth to undefined to avoid hydration errors --- app/sign-up/sign-up-form.tsx | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/app/sign-up/sign-up-form.tsx b/app/sign-up/sign-up-form.tsx index eb1c046..b57fdcd 100644 --- a/app/sign-up/sign-up-form.tsx +++ b/app/sign-up/sign-up-form.tsx @@ -5,15 +5,7 @@ import { useForm } from "react-hook-form"; import { z } from "zod"; import { Button } from "@/components/ui/button"; -import { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, - FormMessage, -} from "@/components/ui/form"; +import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { format } from "date-fns"; import { CalendarIcon } from "lucide-react"; import { Input } from "@/components/ui/input"; @@ -39,7 +31,7 @@ export default function SignUp() { defaultValues: { name: "", email: "", - dob: youngestDate, + dob: undefined, }, }); async function onSubmit(values: z.infer) { @@ -59,9 +51,7 @@ export default function SignUp() { - - We will contact you here with information about events. - + We will contact you here with information about events. )} @@ -91,10 +81,7 @@ export default function SignUp() {