feat: dodanie kalkulatora doboru klimatyzacji i zaktualizowanie 996 produktów
This commit is contained in:
@@ -42,7 +42,6 @@ export function ProductCard({ product }: ProductCardProps) {
|
||||
price: product.price,
|
||||
});
|
||||
setAdded(true);
|
||||
setTimeout(() => setAdded(false), 1500);
|
||||
};
|
||||
|
||||
const handleCompare = (e: React.MouseEvent) => {
|
||||
@@ -161,20 +160,22 @@ export function ProductCard({ product }: ProductCardProps) {
|
||||
)}
|
||||
|
||||
{product.price !== null ? (
|
||||
<button
|
||||
onClick={handleAddToCart}
|
||||
className={`flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-bold transition-all shrink-0 ${
|
||||
added
|
||||
? 'bg-green-500 text-white'
|
||||
: 'bg-accent text-white hover:bg-accent/90'
|
||||
}`}
|
||||
>
|
||||
{added ? (
|
||||
<><Check className="size-3.5" /> Dodano</>
|
||||
) : (
|
||||
<><ShoppingCart className="size-3.5" /> Do koszyka</>
|
||||
)}
|
||||
</button>
|
||||
added ? (
|
||||
<Link
|
||||
href="/koszyk"
|
||||
className="flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-bold bg-green-500 text-white hover:bg-green-600 transition-colors shrink-0"
|
||||
onClick={e => e.stopPropagation()}
|
||||
>
|
||||
<ShoppingCart className="size-3.5" /> Zobacz koszyk
|
||||
</Link>
|
||||
) : (
|
||||
<button
|
||||
onClick={handleAddToCart}
|
||||
className="flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-bold bg-accent text-white hover:bg-accent/90 transition-colors shrink-0"
|
||||
>
|
||||
<ShoppingCart className="size-3.5" /> Do koszyka
|
||||
</button>
|
||||
)
|
||||
) : (
|
||||
<Link href="/kontakt">
|
||||
<button className="flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-bold bg-primary text-white hover:bg-primary/90 transition-colors shrink-0">
|
||||
|
||||
Reference in New Issue
Block a user