"use client"; import { LayoutGrid } from "lucide-react"; import Link from "next/link"; import * as React from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { CategoryService } from "@/services/category.service"; import type { Category } from "@/types/content"; export default function CategoriesPage() { const [categories, setCategories] = React.useState([]); const [loading, setLoading] = React.useState(true); React.useEffect(() => { CategoryService.getAll() .then(setCategories) .finally(() => setLoading(false)); }, []); return (

Catégories

{loading ? Array.from({ length: 6 }).map((_, i) => ( /* biome-ignore lint/suspicious/noArrayIndexKey: skeleton items don't have unique IDs */ )) : categories.map((category) => ( {category.name}

{category.description || `Découvrez tous les mèmes de la catégorie ${category.name}.`}

))}
); }