why doesnt current admin data show up?
This commit is contained in:
@@ -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<UserProfileFormValues>({
|
||||
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({
|
||||
|
||||
Reference in New Issue
Block a user