fix: await searchParams and params for Next.js 15 async API, compute totalPages in all-users page
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m41s
test / unit (pull_request) Successful in 16m33s
test / integration (pull_request) Failing after 17m3s

This commit is contained in:
2026-05-14 17:28:35 +02:00
parent 12adddaa16
commit b95cebc799
9 changed files with 44 additions and 23 deletions

View File

@@ -5,11 +5,12 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { ThoughtList } from "@/components/thought-list";
interface SearchPageProps {
searchParams: { q?: string };
searchParams: Promise<{ q?: string }>;
}
export default async function SearchPage({ searchParams }: SearchPageProps) {
const query = searchParams.q || "";
const { q } = await searchParams;
const query = q || "";
const token = (await cookies()).get("auth_token")?.value ?? null;
if (!query) {