why doesnt current admin data show up?

This commit is contained in:
Leon Serfaty G
2025-07-17 11:40:07 +00:00
parent 549f189370
commit f3a8e297bc
+8
View File
@@ -1,3 +1,4 @@
"use client"; "use client";
import { useForm, type SubmitHandler } from "react-hook-form"; import { useForm, type SubmitHandler } from "react-hook-form";
@@ -41,6 +42,12 @@ export default function UserProfilePage() {
formState: { errors, isDirty }, formState: { errors, isDirty },
} = useForm<UserProfileFormValues>({ } = useForm<UserProfileFormValues>({
resolver: zodResolver(userProfileSchema), resolver: zodResolver(userProfileSchema),
defaultValues: {
name: "",
email: "",
password: "",
confirmPassword: ""
}
}); });
useEffect(() => { useEffect(() => {
@@ -66,6 +73,7 @@ export default function UserProfilePage() {
title: "Profile Updated", title: "Profile Updated",
description: "Your profile has been updated successfully.", description: "Your profile has been updated successfully.",
}); });
// Reset form to new values and clear password fields
reset({ ...data, password: '', confirmPassword: '' }); reset({ ...data, password: '', confirmPassword: '' });
} else { } else {
toast({ toast({