feat: implement i18n for product and category, add 5 new locales
This commit is contained in:
1 parent
96d874233d
commit
2977df0a9d
8 files changed
+25
-25
No files matched your search
@@ -211,7 +211,7 @@ export default function ShopPage() {
|
||||
: 'bg-white text-spa-stone border-spa-stone/20 hover:border-spa-forest hover:text-spa-forest shadow-sm'
|
||||
}`}
|
||||
>
|
||||
{cat.name}
|
||||
{typeof cat.name === 'string' ? cat.name : (cat.name as any)?.[i18n.language] || (cat.name as any)?.en || ''}
|
||||
{cat._count && (
|
||||
<span className={`ml-2 ${activeCategory === cat.id ? 'opacity-80' : 'opacity-60'}`}>({cat._count.products})</span>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user