From 63a396955e0035b671b57b5c71f10f77ed37324a Mon Sep 17 00:00:00 2001 From: "XPS\\Micro" Date: Sat, 31 Jan 2026 10:46:58 +0100 Subject: [PATCH] fix: wrap useSearchParams in Suspense boundary for Next.js 14 compatibility - Added Suspense boundary to verify-success/page.tsx - Added Suspense boundary to verify-error/page.tsx - Fixes build error: useSearchParams() should be wrapped in a suspense boundary - Added Loader2 fallback UI for both pages --- .gitignore | 5 +++++ frontend/src/app/verify-error/page.tsx | 17 +++++++++++++++-- frontend/src/app/verify-success/page.tsx | 15 ++++++++++++++- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bdc7031..f2e70f3 100644 --- a/.gitignore +++ b/.gitignore @@ -168,6 +168,11 @@ junit.xml # Kann bei Bedarf auskommentiert werden um es zu behalten CLAUDE.md +# AGENTS.md - Guide fuer agentic coding assistants +# Wird von AI-Assistenten zum Verstaendnis der Codebase verwendet +# Sollte nicht gepusht werden +AGENTS.md + # ============================================================ # Misc # ============================================================ diff --git a/frontend/src/app/verify-error/page.tsx b/frontend/src/app/verify-error/page.tsx index caf77a3..6be127c 100644 --- a/frontend/src/app/verify-error/page.tsx +++ b/frontend/src/app/verify-error/page.tsx @@ -1,5 +1,6 @@ "use client"; +import { Suspense } from "react"; import { useSearchParams } from "next/navigation"; import Link from "next/link"; import { Button } from "@/components/ui/button"; @@ -10,9 +11,9 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { XCircle, RefreshCw, Mail } from "lucide-react"; +import { XCircle, RefreshCw, Mail, Loader2 } from "lucide-react"; -export default function VerifyErrorPage() { +function VerifyErrorContent() { const searchParams = useSearchParams(); const reason = searchParams.get("reason"); @@ -67,3 +68,15 @@ export default function VerifyErrorPage() { ); } + +export default function VerifyErrorPage() { + return ( + + + + }> + + + ); +} diff --git a/frontend/src/app/verify-success/page.tsx b/frontend/src/app/verify-success/page.tsx index 02f8918..dfda6e5 100644 --- a/frontend/src/app/verify-success/page.tsx +++ b/frontend/src/app/verify-success/page.tsx @@ -1,5 +1,6 @@ "use client"; +import { Suspense } from "react"; import { useEffect, useState } from "react"; import { useRouter, useSearchParams } from "next/navigation"; import Link from "next/link"; @@ -13,7 +14,7 @@ import { } from "@/components/ui/card"; import { CheckCircle2, Container, Loader2 } from "lucide-react"; -export default function VerifySuccessPage() { +function VerifySuccessContent() { const router = useRouter(); const searchParams = useSearchParams(); const token = searchParams.get("token"); @@ -78,3 +79,15 @@ export default function VerifySuccessPage() { ); } + +export default function VerifySuccessPage() { + return ( + + + + }> + + + ); +}