refactor calculation code

- implement fee
- centralize the code
This commit is contained in:
2025-10-27 08:08:22 +03:00
parent 251e7a9369
commit cd49a3756f
13 changed files with 395 additions and 284 deletions

View File

@@ -7,6 +7,7 @@ import ProText from "components/ProText";
import ProTitle from "components/ProTitle";
import { useScrollHandler } from "contexts/ScrollHandlerContext";
import useBreakPoint from "hooks/useBreakPoint";
import { useRestaurant } from "hooks/useRestaurant";
import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom";
import {
@@ -44,6 +45,9 @@ function MenuPage() {
const { isMobile, isTablet, isDesktop } = useBreakPoint();
const isLoading = isLoadingRestaurant || isLoadingMenu;
// Automatically load restaurant taxes when restaurant data is available
useRestaurant(restaurant);
return (
<>
<LocalStorageHandler restaurantID={restaurant?.restautantId || ""} />