work on order type "select" in menu header
This commit is contained in:
@@ -26,6 +26,8 @@ import MenuSkeleton from "./components/MenuSkeleton/MenuSkeleton";
|
||||
import ScrollEventHandler from "./components/ScrollEventHandler";
|
||||
import SearchButton from "./components/SearchButton";
|
||||
import styles from "./menu.module.css";
|
||||
import { enumToSelectOptions } from "utils/helpers/helperFunctions.ts";
|
||||
import { OrderType } from "pages/checkout/hooks/types.ts";
|
||||
|
||||
function MenuPage() {
|
||||
const { id } = useParams();
|
||||
@@ -45,6 +47,8 @@ function MenuPage() {
|
||||
const { isMobile, isTablet, isDesktop } = useBreakPoint();
|
||||
const isLoading = isLoadingRestaurant || isLoadingMenu;
|
||||
|
||||
const orderTypeOptions = enumToSelectOptions(OrderType, t, "orderTypes");
|
||||
|
||||
// Automatically load restaurant taxes when restaurant data is available
|
||||
useRestaurant(restaurant);
|
||||
|
||||
@@ -97,10 +101,11 @@ function MenuPage() {
|
||||
className={`${styles.headerFloatingBtn} ${styles.orderTypeSelectContainer}`}
|
||||
>
|
||||
<Select
|
||||
options={[]}
|
||||
options={orderTypeOptions}
|
||||
variant="borderless"
|
||||
size="small"
|
||||
className={styles.orderTypeSelect}
|
||||
listHeight={150}
|
||||
/>
|
||||
</div>
|
||||
<SearchButton />
|
||||
|
||||
Reference in New Issue
Block a user