SPB Git

spb/trouve-ka Public

Trouve-KA — moteur de recherche web indépendant, Québec-first. Crawler distribué, index OpenSearch, ranking bilingue, galerie d'images. En prod : www.trouve-ka.com

Python 76.8% TypeScript 15.7% SQL 3.9% Shell 1.4% CSS 1.3% Dockerfile 0.7%
919 B · 36 lines tsx
Raw Blame History
1/**2 * Trouve-KA — page de résultats de recherche (enveloppe serveur + Suspense)3 * Author: Simon-Pierre Boucher4 * Contact: contact@spboucher.ai5 */67import { Suspense } from "react";8import type { Metadata } from "next";9import { SearchContent } from "./search-content";1011interface SearchPageProps {12  searchParams: Promise<Record<string, string | string[] | undefined>>;13}1415export async function generateMetadata({16  searchParams,17}: SearchPageProps): Promise<Metadata> {18  const params = await searchParams;19  const q = typeof params.q === "string" ? params.q.trim() : "";20  return { title: q ? q : "Recherche" };21}2223export default function SearchPage() {24  return (25    <Suspense26      fallback={27        <div className="mx-auto w-full max-w-3xl flex-1 px-4 py-16">28          <div className="h-10 animate-pulse rounded-ctl bg-line" />29        </div>30      }31    >32      <SearchContent />33    </Suspense>34  );35}36