diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx
index 281bd0c5..1e1873ae 100644
--- a/client/contexts/AuthContext.tsx
+++ b/client/contexts/AuthContext.tsx
@@ -844,7 +844,9 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
description: `We sent a password reset link to ${email}.`,
});
} catch (error: any) {
- const msg = String(error?.message || error || "Failed to send reset email");
+ const msg = String(
+ error?.message || error || "Failed to send reset email",
+ );
aethexToast.error({ title: "Reset failed", description: msg });
throw new Error(msg);
}
@@ -869,7 +871,9 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
});
}
} catch (error: any) {
- const msg = String(error?.message || error || "Failed to update password");
+ const msg = String(
+ error?.message || error || "Failed to update password",
+ );
aethexToast.error({ title: "Update failed", description: msg });
throw new Error(msg);
}
diff --git a/client/pages/Login.tsx b/client/pages/Login.tsx
index 23602682..26275a62 100644
--- a/client/pages/Login.tsx
+++ b/client/pages/Login.tsx
@@ -51,8 +51,15 @@ export default function Login() {
const [showReset, setShowReset] = useState(false);
const [resetEmail, setResetEmail] = useState("");
const navigate = useNavigate();
- const { signIn, signUp, signInWithOAuth, user, loading, profileComplete, requestPasswordReset } =
- useAuth();
+ const {
+ signIn,
+ signUp,
+ signInWithOAuth,
+ user,
+ loading,
+ profileComplete,
+ requestPasswordReset,
+ } = useAuth();
const { info: toastInfo, error: toastError } = useAethexToast();
// After auth resolves and a user exists, navigate to dashboard
@@ -396,7 +403,8 @@ export default function Login() {
Reset your password
- Enter the email associated with your account. We'll send a reset link.
+ Enter the email associated with your account. We'll send a reset
+ link.
diff --git a/client/pages/ResetPassword.tsx b/client/pages/ResetPassword.tsx
index 4061a64e..f2ce0ab7 100644
--- a/client/pages/ResetPassword.tsx
+++ b/client/pages/ResetPassword.tsx
@@ -1,6 +1,12 @@
import React, { useEffect, useState } from "react";
import Layout from "@/components/Layout";
-import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+ CardDescription,
+} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Button } from "@/components/ui/button";
@@ -40,21 +46,33 @@ export default function ResetPassword() {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (!password || password.length < 6) {
- toastError({ title: "Invalid password", description: "Minimum 6 characters." });
+ toastError({
+ title: "Invalid password",
+ description: "Minimum 6 characters.",
+ });
return;
}
if (password !== confirm) {
- toastError({ title: "Passwords do not match", description: "Please re-enter matching passwords." });
+ toastError({
+ title: "Passwords do not match",
+ description: "Please re-enter matching passwords.",
+ });
return;
}
setSubmitting(true);
try {
await updatePassword(password);
- toastSuccess({ title: "Password updated", description: "Please sign in with your new password." });
+ toastSuccess({
+ title: "Password updated",
+ description: "Please sign in with your new password.",
+ });
navigate("/login", { replace: true });
} catch (err: any) {
// Error already toasted in context; keep here for safety
- toastError({ title: "Update failed", description: err?.message || "Try again." });
+ toastError({
+ title: "Update failed",
+ description: err?.message || "Try again.",
+ });
} finally {
setSubmitting(false);
}
@@ -62,7 +80,11 @@ export default function ResetPassword() {
if (isLoading) {
return (
-
+
);
}
@@ -72,13 +94,19 @@ export default function ResetPassword() {
- Set a new password
- Enter and confirm your new password
+
+ Set a new password
+
+
+ Enter and confirm your new password
+