feat(cart): agregar botón de pago
This commit is contained in:
parent
8fd072af8b
commit
2200c5e0d2
2 changed files with 13 additions and 7 deletions
18
src/Cart.jsx
18
src/Cart.jsx
|
|
@ -6,12 +6,6 @@ const Cart = () => {
|
|||
return (
|
||||
<section id="cart">
|
||||
<h1 className="text-4xl font-bold">Carrito</h1>
|
||||
<p>
|
||||
Total:
|
||||
<strong>
|
||||
{` $${cart.reduce((acc, it) => acc + it.price * it.count, 0).toLocaleString("es-CL")}`}
|
||||
</strong>
|
||||
</p>
|
||||
<div id="cartContainer" className="flex gap-4 flex-col">
|
||||
{cart.map((pizza) => (
|
||||
<div
|
||||
|
|
@ -53,7 +47,19 @@ const Cart = () => {
|
|||
</div>
|
||||
</div>
|
||||
))}
|
||||
<p className="text-3xl">
|
||||
Total:
|
||||
<strong>
|
||||
{` $${cart.reduce((acc, it) => acc + it.price * it.count, 0).toLocaleString("es-CL")}`}
|
||||
</strong>
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
type="submit"
|
||||
className="bg-black text-white rounded-md p-2 text-lg hover:bg-gray-500"
|
||||
>
|
||||
Pagar
|
||||
</button>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { StrictMode } from "react";
|
|||
import { createRoot } from "react-dom/client";
|
||||
import "./index.css";
|
||||
import App from "./App.jsx";
|
||||
import "virtual:uno.css";
|
||||
import "@unocss/reset/tailwind.css";
|
||||
import "virtual:uno.css";
|
||||
|
||||
createRoot(document.getElementById("root")).render(
|
||||
<StrictMode>
|
||||
|
|
|
|||
Loading…
Reference in a new issue