From a23753f65272dca3f0b54bed16d96512a3cbe20d Mon Sep 17 00:00:00 2001 From: schererleander Date: Fri, 26 Dec 2025 18:08:25 +0100 Subject: refactor(settings): split settings page into separate form components --- src/app/settings/password-form.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/app/settings/password-form.tsx') diff --git a/src/app/settings/password-form.tsx b/src/app/settings/password-form.tsx index 2377408..f56ae9e 100644 --- a/src/app/settings/password-form.tsx +++ b/src/app/settings/password-form.tsx @@ -16,7 +16,6 @@ export function PasswordForm() { const [showCurrentPassword, setShowCurrentPassword] = useState(false) const [showNewPassword, setShowNewPassword] = useState(false) const [showConfirmPassword, setShowConfirmPassword] = useState(false) - const [isLoading, setIsLoading] = useState(false) const form = useForm({ resolver: zodResolver(passwordChangeSchema), @@ -28,8 +27,6 @@ export function PasswordForm() { }) const onSubmit = async (data: PasswordChangeInput) => { - setIsLoading(true) - try { const response = await fetch("/api/user/password", { method: "PATCH", @@ -51,8 +48,6 @@ export function PasswordForm() { form.reset() } catch { toast.error("An unexpected error occurred") - } finally { - setIsLoading(false) } } @@ -169,8 +164,8 @@ export function PasswordForm() {
Password must contain at least 8 characters with uppercase, lowercase, and a number.
- -- cgit v1.3.1