From d24f484bb26b11af17ca28919d69202037649d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Wed, 22 Oct 2025 01:59:24 -0500 Subject: [PATCH] Fixed remaining ESLint warnings. --- src/app/(auth)/reset-password/page.tsx | 29 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/app/(auth)/reset-password/page.tsx b/src/app/(auth)/reset-password/page.tsx index 1b1b9bc..703d4a3 100644 --- a/src/app/(auth)/reset-password/page.tsx +++ b/src/app/(auth)/reset-password/page.tsx @@ -1,11 +1,11 @@ "use client"; -import { useState, useCallback, useEffect } from "react"; +import { useState, useCallback, useEffect, Suspense } from "react"; import { AUTH } from "@/api/auth/api"; import Link from "next/link"; import { useSearchParams } from "next/navigation"; -export default function ResetPasswordPage() { +function ResetPasswordForm() { const searchParams = useSearchParams(); const token = searchParams.get("token"); @@ -59,10 +59,11 @@ export default function ResetPasswordPage() { if (ok && data) { setSuccess(true); } else { - setError( - (data?.message as string) || - "Failed to reset password. Please try again." - ); + const errorMessage = + data && typeof data === "object" && "message" in data + ? (data.message as string) + : "Failed to reset password. Please try again."; + setError(errorMessage); } }, [token, password, passwordError] @@ -228,3 +229,19 @@ export default function ResetPasswordPage() { ); } + +export default function ResetPasswordPage() { + return ( + +
+ Loading... +
+ + } + > + +
+ ); +}