diff --git a/apps/website/src/app/shop/page.tsx b/apps/website/src/app/shop/page.tsx
index df39d2f..9df013c 100644
--- a/apps/website/src/app/shop/page.tsx
+++ b/apps/website/src/app/shop/page.tsx
@@ -103,7 +103,7 @@ export default function ShopPage() {
activeCategory === cat.id ? 'bg-cyan-glow text-night-900 shadow-[0_0_15px_rgba(102,252,241,0.3)]' : 'glass hover:bg-white/10'
}`}
>
- {cat.name}
+ {typeof cat.name === 'string' ? cat.name : (cat.name as any)?.th || (cat.name as any)?.en || ''}
{cat._count &&
}
))}
diff --git a/apps/website/src/components/AddToCartSection.tsx b/apps/website/src/components/AddToCartSection.tsx
index 10f022e..15edfb6 100644
--- a/apps/website/src/components/AddToCartSection.tsx
+++ b/apps/website/src/components/AddToCartSection.tsx
@@ -30,7 +30,7 @@ export default function AddToCartSection({ product }: Props) {
price: currentVariant.price || product.price || 0,
productName: product.scent.name,
variantSize: currentVariant.size,
- productImage: product.images?.[0]?.url || product.category.imageUrl || getCategoryImage(product.category.name),
+ productImage: product.images?.[0]?.url || product.category.imageUrl || getCategoryImage(typeof product.category.name === 'string' ? product.category.name : (product.category.name as any)?.th || (product.category.name as any)?.en || ''),
})
toggleCart(true)
}
@@ -41,7 +41,7 @@ export default function AddToCartSection({ product }: Props) {
- {product.category.name}
+ {typeof product.category.name === 'string' ? product.category.name : (product.category.name as any)?.th || (product.category.name as any)?.en || ''}
{product.scent.name}
Premium Collection
@@ -108,7 +108,7 @@ export default function AddToCartSection({ product }: Props) {
Category
- {product.category.name}
+ {typeof product.category.name === 'string' ? product.category.name : (product.category.name as any)?.th || (product.category.name as any)?.en || ''}
diff --git a/apps/website/src/components/Footer.tsx b/apps/website/src/components/Footer.tsx
index a824342..c1913c1 100644
--- a/apps/website/src/components/Footer.tsx
+++ b/apps/website/src/components/Footer.tsx
@@ -45,7 +45,7 @@ export default function Footer({ categories = [] }: FooterProps) {
{categories.map((c) => (
- {c.name}
+ {typeof c.name === 'string' ? c.name : (c.name as any)?.th || (c.name as any)?.en || ''}
))}
diff --git a/apps/website/src/components/Navbar.tsx b/apps/website/src/components/Navbar.tsx
index a9fce88..eedb4db 100644
--- a/apps/website/src/components/Navbar.tsx
+++ b/apps/website/src/components/Navbar.tsx
@@ -101,7 +101,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
href={`/category/${cat.id}`}
className="flex items-center justify-between px-4 py-2.5 text-xs uppercase tracking-widest rounded-lg hover:bg-white/10 hover:text-cyan-glow transition-colors"
>
- {cat.name}
+ {typeof cat.name === 'string' ? cat.name : (cat.name as any)?.th || (cat.name as any)?.en || ''}
@@ -281,7 +281,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
onClick={() => setMobileOpen(false)}
className="flex items-center justify-between px-4 py-2.5 rounded-xl text-sm text-slate-400 hover:text-white hover:bg-white/5 transition-all"
>
- {cat.name}
+ {typeof cat.name === 'string' ? cat.name : (cat.name as any)?.th || (cat.name as any)?.en || ''}
@@ -350,7 +350,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
Quick Links
{[
- ...categories.map(c => ({ label: c.name, to: `/category/${c.id}` })),
+ ...categories.map(c => ({ label: typeof c.name === 'string' ? c.name : (c.name as any)?.th || (c.name as any)?.en || '', to: `/category/${c.id}` })),
{ label: '✨ Scent Guide', to: '/scent-guide' },
{ label: 'All Products', to: '/shop' },
].map(item => (
diff --git a/apps/website/src/components/ProductCard.tsx b/apps/website/src/components/ProductCard.tsx
index 8ccd5be..0b63fb5 100644
--- a/apps/website/src/components/ProductCard.tsx
+++ b/apps/website/src/components/ProductCard.tsx
@@ -11,13 +11,13 @@ export default function ProductCard({ product }: ProductCardProps) {

{/* Category badge */}
- {product.category.name}
+ {typeof product.category.name === 'string' ? product.category.name : (product.category.name as any)?.th || (product.category.name as any)?.en || ''}
{/* Available badge */}
@@ -32,7 +32,7 @@ export default function ProductCard({ product }: ProductCardProps) {
{product.scent.name}
- {product.category.name}
+ {typeof product.category.name === 'string' ? product.category.name : (product.category.name as any)?.th || (product.category.name as any)?.en || ''}