ok
This commit is contained in:
26
src/App.js
26
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}
|
||||
/>
|
||||
<Footer
|
||||
{/* <Footer
|
||||
showTable={true}
|
||||
shopId={shopIdentifier}
|
||||
table={table}
|
||||
cartItemsLength={totalItemsCount}
|
||||
selectedPage={0}
|
||||
/>
|
||||
/> */}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@@ -588,12 +592,12 @@ function App() {
|
||||
removeConnectedGuestSides={rmConnectedGuestSides}
|
||||
setModal={setModal} // Pass the function to open modal
|
||||
/>
|
||||
<Footer
|
||||
{/* <Footer
|
||||
shopId={shopIdentifier}
|
||||
table={table}
|
||||
cartItemsLength={totalItemsCount}
|
||||
selectedPage={1}
|
||||
/>
|
||||
/> */}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@@ -609,12 +613,12 @@ function App() {
|
||||
totalItemsCount={totalItemsCount}
|
||||
deviceType={deviceType}
|
||||
/>
|
||||
<Footer
|
||||
{/* <Footer
|
||||
shopId={shopIdentifier}
|
||||
table={table}
|
||||
cartItemsLength={totalItemsCount}
|
||||
selectedPage={2}
|
||||
/>
|
||||
/> */}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@@ -629,12 +633,12 @@ function App() {
|
||||
socket={socket}
|
||||
deviceType={deviceType}
|
||||
/>
|
||||
<Footer
|
||||
{/* <Footer
|
||||
shopId={shopIdentifier}
|
||||
table={table}
|
||||
cartItemsLength={totalItemsCount}
|
||||
selectedPage={2}
|
||||
/>
|
||||
/> */}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@@ -647,12 +651,12 @@ function App() {
|
||||
sendParam={handleSetParam}
|
||||
deviceType={deviceType}
|
||||
/>
|
||||
<Footer
|
||||
{/* <Footer
|
||||
shopId={shopIdentifier}
|
||||
table={table}
|
||||
cartItemsLength={totalItemsCount}
|
||||
selectedPage={3}
|
||||
/>
|
||||
/> */}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user