From 39a2e8012ba38d6663820ae27080a2b843c08c5f Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 14 Dec 2022 12:01:13 +0700 Subject: Add to cart to localstorage --- src/pages/shop/cart.js | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/pages/shop/cart.js (limited to 'src/pages/shop/cart.js') diff --git a/src/pages/shop/cart.js b/src/pages/shop/cart.js new file mode 100644 index 00000000..2de1a7ac --- /dev/null +++ b/src/pages/shop/cart.js @@ -0,0 +1,51 @@ +import { useEffect } from "react"; +import Header from "../../components/Header"; +import Layout from "../../components/Layout"; +import Link from "../../components/Link"; +import { getCart } from "../../helpers/cart"; +import ChevronLeftIcon from "../../icons/chevron-left.svg"; + +export default function Cart() { + useEffect(() => { + console.log(getCart()); + }) + return ( + <> +
+ +
+ {/* Progress Bar */} +
+
+
1
+

Keranjang

+
+
+
+
+
+
2
+

Pembayaran

+
+
+
+
+
+
3
+

Selesai

+
+
+ {/* [End] Progress Bar */} + {/* Title */} +
+ + + +

Keranjang Saya

+
+ {/* [End] Title */} +
+
+ + ); +} \ No newline at end of file -- cgit v1.2.3