diff --git a/src/App.css b/src/App.css index f70efc5..5576ee1 100644 --- a/src/App.css +++ b/src/App.css @@ -8,7 +8,7 @@ body { } .App { - overflow-x: hidden; + /* overflow-x: hidden; */ } .App-logo { diff --git a/src/App.js b/src/App.js index 37de452..a9f209c 100644 --- a/src/App.js +++ b/src/App.js @@ -55,6 +55,7 @@ function App() { const [shopIdentifier, setShopIdentifier] = useState(""); const [table, setTable] = useState([]); const [totalItemsCount, setTotalItemsCount] = useState(0); + const [totalPrice, setTotalPrice] = useState(0); const [deviceType, setDeviceType] = useState(""); const [shop, setShop] = useState([]); const [shopItems, setShopItems] = useState([]); @@ -78,8 +79,9 @@ function App() { useEffect(() => { const calculateTotalsFromLocalStorage = () => { - const { totalCount } = calculateTotals(shopId); + const { totalCount, totalPrice } = calculateTotals(shopId); setTotalItemsCount(totalCount); + setTotalPrice(totalPrice); }; calculateTotalsFromLocalStorage(); @@ -563,14 +565,16 @@ function App() { setModal={setModal} // Pass the function to open modal loading={shop.name == null} queue={queue} + cartItemsLength={totalItemsCount} + totalPrice={totalPrice} /> -