mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 15:36:58 +00:00
fix: remove priceincart
Signed-off-by: jrphilo <james.philo@me.com>
This commit is contained in:
parent
598c1ad53e
commit
2cdfae11b2
@ -1,22 +0,0 @@
|
|||||||
const PriceInCart = ({ items }) => {
|
|
||||||
const totalPrice = items.reduce((sum, item) => sum + item.price, 0);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="mt-4 border-t border-neutral-300 p-4">
|
|
||||||
<ul>
|
|
||||||
{items.map((item, index) => (
|
|
||||||
<li key={index} className="flex justify-between">
|
|
||||||
<span>{item.label}</span>
|
|
||||||
<span>${item.price.toFixed(2)}</span>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
<li className="mt-2 flex justify-between border-t border-neutral-300 pt-2 font-bold">
|
|
||||||
<span>Total In Cart</span>
|
|
||||||
<span>${totalPrice.toFixed(2)}</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default PriceInCart;
|
|
Loading…
x
Reference in New Issue
Block a user