import { Suspense } from "react"; import type { Metadata } from "next"; import Link from "next/link"; import { Shapes } from "lucide-react"; import { getCategoryCounts, getCollections, getIconsByCategory, } from "@/lib/icons"; import { SidebarShell } from "@/components/layout/sidebar-shell"; export const metadata: Metadata = { title: "Browse All Categories", description: "Explore all icon categories on theSVG. Browse 6,030+ brand, AWS, Azure, and GCP SVG icons organized by category.", keywords: [ "SVG icon categories", "brand icon categories", "AWS icon categories", "Azure icon categories", "GCP icon categories", "icon browser", "browse SVG icons", ], openGraph: { title: "Browse All Categories | theSVG", description: "Explore all icon categories on theSVG.", siteName: "theSVG", }, alternates: { canonical: "https://thesvg.org/categories" }, }; function CategoryCard({ name, count, href, sampleIcons, }: { name: string; count: number; href: string; sampleIcons: { slug: string; src: string }[]; }) { return (
{name} {count}
{sampleIcons.length > 0 && (
{sampleIcons.map((icon) => ( ))}
)} ); } export default function CategoriesPage() { const allCategoryCounts = getCategoryCounts(); const collections = getCollections(); const brandCategories = getCategoryCounts("brands"); const awsCategories = getCategoryCounts("aws"); const totalCategories = brandCategories.length + awsCategories.length; // Build sample icons for each category (up to 6 per category) const samplesByCategory = new Map(); for (const cat of [...brandCategories, ...awsCategories]) { if (!samplesByCategory.has(cat.name)) { const icons = getIconsByCategory(cat.name).slice(0, 6); samplesByCategory.set( cat.name, icons.map((i) => ({ slug: i.slug, src: i.variants.default, })) ); } } return (
{/* Header */}
{totalCategories} categories

All Categories

Browse all icon categories across brand and AWS architecture collections.

{/* Brand Icon Categories */} {brandCategories.length > 0 && (

Brand Icon Categories

{brandCategories.length}
{brandCategories.map((cat) => ( ))}
)} {/* AWS Architecture Categories */} {awsCategories.length > 0 && (

AWS Architecture Categories

{awsCategories.length}
{awsCategories.map((cat) => ( ))}
)}
); }