feat: optymalizacja GlobalSearch, nawigacji oraz filtrów w sklepie
This commit is contained in:
@@ -8,6 +8,20 @@ import { useCartStore } from '@/lib/cart-store';
|
||||
import { useCompareStore } from '@/lib/compare-store';
|
||||
import { useState } from 'react';
|
||||
|
||||
const brandLogos: Record<string, string> = {
|
||||
'Gree': '/brands/gree.webp',
|
||||
'Rotenso': '/brands/rotenso.png',
|
||||
'Toshiba': '/brands/toshiba.jpg',
|
||||
'Daikin': '/brands/daikin.png',
|
||||
'CHV': '/brands/chv.jpeg',
|
||||
'Haier': '/brands/haier.jpg',
|
||||
'Aux': '/brands/aux.png',
|
||||
'LG': '/brands/lg.png',
|
||||
'Samsung': '/brands/samsung.png',
|
||||
'Mitsubishi Electric': '/brands/mitsubishi-electric.png',
|
||||
'Fuji Electric': '/brands/fuji-electric.png',
|
||||
};
|
||||
|
||||
interface ProductCardProps {
|
||||
product: Product;
|
||||
}
|
||||
@@ -64,9 +78,22 @@ export function ProductCard({ product }: ProductCardProps) {
|
||||
/>
|
||||
|
||||
{/* Badge marka */}
|
||||
<span className="absolute top-2 left-2 px-2 py-1 bg-white/95 rounded-md text-xs font-semibold text-primary border border-border shadow-sm">
|
||||
{product.brand}
|
||||
</span>
|
||||
<div className="absolute top-2 left-2 px-2 py-1 bg-white/95 rounded-md border border-border shadow-sm flex items-center justify-center min-h-[28px]">
|
||||
{brandLogos[product.brand] ? (
|
||||
<div className="bg-white rounded px-2 py-1 inline-block">
|
||||
<Image
|
||||
src={brandLogos[product.brand]}
|
||||
alt={product.brand}
|
||||
width={56}
|
||||
height={20}
|
||||
className="object-contain"
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<span className="text-xs font-semibold text-primary">{product.brand}</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Badge multisplit */}
|
||||
{product.category === 'multisplit' && (
|
||||
|
||||
Reference in New Issue
Block a user