fix frontend build

This commit is contained in:
Adam Cohen Hillel 2025-04-18 13:18:08 +01:00
parent 51a67be189
commit d688e204b6
1 changed files with 11 additions and 2 deletions

View File

@ -1,13 +1,13 @@
"use client"; "use client";
import { useState, useEffect } from "react"; import { useState, useEffect, Suspense } from "react";
import Link from "next/link"; import Link from "next/link";
import { FlickeringGrid } from "@/components/home/ui/flickering-grid"; import { FlickeringGrid } from "@/components/home/ui/flickering-grid";
import { useMediaQuery } from "@/hooks/use-media-query"; import { useMediaQuery } from "@/hooks/use-media-query";
import { ArrowLeft } from "lucide-react"; import { ArrowLeft } from "lucide-react";
import { useSearchParams, useRouter, usePathname } from "next/navigation"; import { useSearchParams, useRouter, usePathname } from "next/navigation";
export default function LegalPage() { function LegalContent() {
const searchParams = useSearchParams(); const searchParams = useSearchParams();
const router = useRouter(); const router = useRouter();
const pathname = usePathname(); const pathname = usePathname();
@ -351,3 +351,12 @@ export default function LegalPage() {
</main> </main>
); );
} }
// Wrap the LegalContent component with Suspense to handle useSearchParams()
export default function LegalPage() {
return (
<Suspense fallback={<div className="flex items-center justify-center min-h-screen">Loading...</div>}>
<LegalContent />
</Suspense>
);
}