feat(F-070): completed feature
This commit is contained in:
25
project/frontend/src/lib/product-attributes.ts
Normal file
25
project/frontend/src/lib/product-attributes.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { ProductAttribute } from '@/types/api';
|
||||
|
||||
/** Human-readable labels for product attribute tags. */
|
||||
export const ATTRIBUTE_LABELS: Record<ProductAttribute, string> = {
|
||||
bio: 'Eco',
|
||||
'comercio-justo': 'Comercio justo',
|
||||
congelado: 'Congelado',
|
||||
'cruelty-free': 'Cruelty-free',
|
||||
'de-temporada': 'De temporada',
|
||||
demeter: 'Demeter',
|
||||
'fruta-verdura': 'Fruta y verdura',
|
||||
keto: 'Keto',
|
||||
kosher: 'Kosher',
|
||||
'low-carb': 'Low-carb',
|
||||
'raw-food': 'Raw food',
|
||||
'sin-azucar': 'Sin azúcar',
|
||||
'sin-gluten': 'Sin gluten',
|
||||
'sin-lactosa': 'Sin lactosa',
|
||||
vegano: 'Vegano',
|
||||
'zero-waste': 'Zero waste',
|
||||
};
|
||||
|
||||
export function getAttributeLabel(attr: ProductAttribute): string {
|
||||
return ATTRIBUTE_LABELS[attr] ?? attr;
|
||||
}
|
||||
Reference in New Issue
Block a user