"use client"; import { useActionState } from "react"; import { useFormStatus } from "react-dom"; import { useSearchParams } from "next/navigation"; import Link from "next/link"; import { resetPassword } from "@/app/actions/auth"; function SubmitButton() { const { pending } = useFormStatus(); return ( ); } export default function ResetPasswordForm() { const searchParams = useSearchParams(); const token = searchParams.get("token") ?? ""; const [state, formAction] = useActionState(resetPassword, undefined); return (
OL

Order Loop

Reset your password

Enter your new password below.

{state?.message && (
{state.message}
)} {state?.success ? ( Go to login ) : (
)}
); }