feat: build game catalog page with filters and grid

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
consultoria-as
2026-02-22 04:01:50 +00:00
parent eabc858f9a
commit 70a603274b
3 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import { Suspense } from "react";
import { getGames } from "@/lib/api";
import { CatalogFilters } from "@/components/catalog/CatalogFilters";
import { CatalogGrid } from "@/components/catalog/CatalogGrid";
export default async function CatalogPage({
params,
}: {
params: Promise<{ locale: string }>;
}) {
const { locale } = await params;
let games: any[] = [];
try {
const res = await getGames(locale);
games = res.data;
} catch {
// Strapi not running
}
return (
<div className="max-w-7xl mx-auto px-4 py-12">
<h1 className="text-4xl font-bold mb-8">
{locale === "es" ? "Catálogo de Juegos" : "Game Catalog"}
</h1>
<Suspense>
<CatalogFilters />
</Suspense>
<CatalogGrid games={games} locale={locale} />
</div>
);
}