import { getTranslations } from 'next-intl/server' import { SECTORS } from '@/lib/extensions/sectors' import { sectorNameKey } from '@/lib/extensions/i18n' import { PageHeader } from '@/components/ui/page-header' import ExtensionCard from '@/components/extensions/ExtensionCard' import SectorCard from '@/components/extensions/SectorCard' export default async function ExtensionsPage() { const t = await getTranslations('extensions') const generalSector = SECTORS.find(s => s.slug === 'general') // Only sectors that actually ship extensions: a shell with zero extensions // would render a dead card and an empty grid. const industrySectors = SECTORS.filter(s => s.slug !== 'general' && s.extensions.length > 0) const generalSectorName = (() => { if (!generalSector) return '' const key = sectorNameKey(generalSector.slug) return key ? t(key) : generalSector.name })() return (
{/* General extensions */} {generalSector && (

{generalSectorName}

{generalSector.extensions.map(ext => ( ))}
)} {/* Industry sectors (hidden while no industry sector ships extensions) */} {industrySectors.length > 0 && (

{t('industry_tools')}

{industrySectors.map(sector => ( ))}
)}
) }