From 035d1e036359e8e590f2e17c0390e5d3ffec1728 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Wed, 16 Oct 2024 16:18:13 +0530 Subject: Add CartScreen with quantity adjustment functionality --- src/screens/Cart/CartScreen.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/screens/Cart/CartScreen.js diff --git a/src/screens/Cart/CartScreen.js b/src/screens/Cart/CartScreen.js new file mode 100644 index 0000000..392e665 --- /dev/null +++ b/src/screens/Cart/CartScreen.js @@ -0,0 +1,23 @@ +import React, { useContext } from 'react'; +import { View, Text, Button } from 'react-native'; +import { CartContext } from '../../context/CartContext'; + +const CartScreen = ({ navigation }) => { + const { cart, updateQuantity } = useContext(CartContext); + + const handleCheckout = () => navigation.navigate('Checkout'); + + return ( + + {cart.map((item, index) => ( + + {item.name} - Quantity: {item.quantity} +