feat: dodanie kalkulatora doboru klimatyzacji i zaktualizowanie 996 produktów

This commit is contained in:
MichalC
2026-06-28 00:16:22 +02:00
parent c4294a81cf
commit 002a325dfb
10 changed files with 5740 additions and 1451 deletions
+16 -15
View File
@@ -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">