From f3a8e297bcd6f760fe378d8b7335e6bb96ac7c4d Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Thu, 17 Jul 2025 11:40:07 +0000 Subject: [PATCH] why doesnt current admin data show up? --- src/app/admin/settings/user/page.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/admin/settings/user/page.tsx b/src/app/admin/settings/user/page.tsx index 7c3f4db..1a423dc 100644 --- a/src/app/admin/settings/user/page.tsx +++ b/src/app/admin/settings/user/page.tsx @@ -1,3 +1,4 @@ + "use client"; import { useForm, type SubmitHandler } from "react-hook-form"; @@ -41,6 +42,12 @@ export default function UserProfilePage() { formState: { errors, isDirty }, } = useForm({ resolver: zodResolver(userProfileSchema), + defaultValues: { + name: "", + email: "", + password: "", + confirmPassword: "" + } }); useEffect(() => { @@ -66,6 +73,7 @@ export default function UserProfilePage() { title: "Profile Updated", description: "Your profile has been updated successfully.", }); + // Reset form to new values and clear password fields reset({ ...data, password: '', confirmPassword: '' }); } else { toast({