From d688e204b69eccd78e5417b4621f066995395406 Mon Sep 17 00:00:00 2001 From: Adam Cohen Hillel Date: Fri, 18 Apr 2025 13:18:08 +0100 Subject: [PATCH] fix frontend build --- frontend/src/app/legal/page.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/legal/page.tsx b/frontend/src/app/legal/page.tsx index 12e6bb39..da18f87e 100644 --- a/frontend/src/app/legal/page.tsx +++ b/frontend/src/app/legal/page.tsx @@ -1,13 +1,13 @@ "use client"; -import { useState, useEffect } from "react"; +import { useState, useEffect, Suspense } from "react"; import Link from "next/link"; import { FlickeringGrid } from "@/components/home/ui/flickering-grid"; import { useMediaQuery } from "@/hooks/use-media-query"; import { ArrowLeft } from "lucide-react"; import { useSearchParams, useRouter, usePathname } from "next/navigation"; -export default function LegalPage() { +function LegalContent() { const searchParams = useSearchParams(); const router = useRouter(); const pathname = usePathname(); @@ -351,3 +351,12 @@ export default function LegalPage() { ); } + +// Wrap the LegalContent component with Suspense to handle useSearchParams() +export default function LegalPage() { + return ( + Loading...}> + + + ); +}