diff --git a/src/app/(auth)/change-password/page.tsx b/src/app/(auth)/change-password/page.tsx index 5916755..12fdec1 100644 --- a/src/app/(auth)/change-password/page.tsx +++ b/src/app/(auth)/change-password/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { Suspense, useState } from "react"; import { useRouter, useSearchParams } from "next/navigation"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; @@ -8,7 +8,18 @@ import { Label } from "@/components/ui/label"; const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH ?? ""; +// Next.js 16 requires useSearchParams() consumers to live under a Suspense +// boundary so the static prerender has something to bail out into. Split the +// inner form out; the default export is just the Suspense shell. export default function ChangePasswordPage() { + return ( + + + + ); +} + +function ChangePasswordForm() { const router = useRouter(); const search = useSearchParams(); const isFirstLogin = search.get("first") === "1";