Files
accounted/app/(dashboard)/extensions/page.tsx
T
Mattsson e4488a900b feat: add user locale preference to user_preferences table (#555)
* feat: add user locale preference to user_preferences table

- Introduced a new column 'locale' in the user_preferences table to store per-user UI language preferences.
- Added a CHECK constraint to ensure only supported locales ('sv', 'en') are allowed.
- Triggered a schema reload notification for the changes.

chore: declare CSS module support in TypeScript

- Added a declaration for CSS modules in globals.d.ts to enable TypeScript support for importing CSS files.

* feat: add Swish as an invoice payment method in company settings
2026-05-21 21:33:22 +02:00

55 lines
1.8 KiB
TypeScript

import { getTranslations } from 'next-intl/server'
import { SECTORS } from '@/lib/extensions/sectors'
import { sectorNameKey } from '@/lib/extensions/i18n'
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')
const industrySectors = SECTORS.filter(s => s.slug !== 'general')
const generalSectorName = (() => {
if (!generalSector) return ''
const key = sectorNameKey(generalSector.slug)
return key ? t(key) : generalSector.name
})()
return (
<div>
<div className="mb-8">
<h1 className="text-xl font-semibold tracking-tight">{t('page_title')}</h1>
<p className="text-sm text-muted-foreground mt-1">
{t('page_description')}
</p>
</div>
{/* General extensions */}
{generalSector && (
<section className="mb-8">
<h2 className="text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-4">
{generalSectorName}
</h2>
<div className="grid grid-cols-1 md:grid-cols-2 gap-3">
{generalSector.extensions.map(ext => (
<ExtensionCard key={ext.slug} extension={ext} />
))}
</div>
</section>
)}
{/* Industry sectors */}
<section>
<h2 className="text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-4">
{t('industry_tools')}
</h2>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3">
{industrySectors.map(sector => (
<SectorCard key={sector.slug} sector={sector} />
))}
</div>
</section>
</div>
)
}