import { Form, Select } from "antd"; import ProInputCard from "components/ProInputCard/ProInputCard.tsx"; import { removeTable, selectCart, updateTables, } from "features/order/orderSlice.ts"; import styles from "pages/cart/cart.module.css"; import { OrderType } from "pages/checkout/hooks/types"; import { useTranslation } from "react-i18next"; import { useGetTablesQuery } from "redux/api/others"; import { useAppDispatch, useAppSelector } from "redux/hooks.ts"; export default function TableNumberCard() { const { t } = useTranslation(); const { tables, orderType } = useAppSelector(selectCart); const dispatch = useAppDispatch(); const { data: tableList } = useGetTablesQuery( { restaurantID: localStorage.getItem("restaurantID") || "", tableType: orderType === OrderType.DineIn ? "1" : "2", }, { skip: !localStorage.getItem("restaurantID") || !orderType, }, ); return ( <>