siang ok
This commit is contained in:
@@ -12,7 +12,9 @@ import {
|
||||
} from "../helpers/transactionHelpers";
|
||||
|
||||
export default function Invoice({ sendParam, deviceType }) {
|
||||
const { shopId } = useParams();
|
||||
const { shopId, tableId } = useParams();
|
||||
sendParam({ shopId, tableId });
|
||||
|
||||
const location = useLocation(); // Use useLocation hook instead of useSearchParams
|
||||
const searchParams = new URLSearchParams(location.search); // Pass location.search directly
|
||||
|
||||
@@ -20,10 +22,6 @@ export default function Invoice({ sendParam, deviceType }) {
|
||||
const orderType = searchParams.get("orderType");
|
||||
const tableNumber = searchParams.get("tableNumber");
|
||||
|
||||
useEffect(() => {
|
||||
sendParam(shopId);
|
||||
}, [sendParam, shopId]);
|
||||
|
||||
const [cartItems, setCartItems] = useState([]);
|
||||
const [totalPrice, setTotalPrice] = useState(0);
|
||||
const [isPaymentLoading, setIsPaymentLoading] = useState(false); // State for payment button loading animation
|
||||
|
||||
Reference in New Issue
Block a user