change url param name to "subdomain"
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
import { Button, FormInstance } from "antd";
|
||||
import { selectCart } from "features/order/orderSlice";
|
||||
import { OrderType } from "pages/checkout/hooks/types.ts";
|
||||
import { useCallback, useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { useAppSelector } from "redux/hooks";
|
||||
import styles from "../../address/address.module.css";
|
||||
import useOrder from "../hooks/useOrder";
|
||||
import { OrderType } from "pages/checkout/hooks/types.ts";
|
||||
|
||||
export default function CheckoutButton({ form }: { form: FormInstance }) {
|
||||
const { t } = useTranslation();
|
||||
const { orderType } = useAppSelector(selectCart);
|
||||
const navigate = useNavigate();
|
||||
const { handleCreateOrder } = useOrder();
|
||||
const { id } = useParams();
|
||||
const { subdomain } = useParams();
|
||||
|
||||
const handleSplitBillClick = useCallback(() => {
|
||||
navigate(`/${id}/split-bill`);
|
||||
}, [navigate, id]);
|
||||
navigate(`/${subdomain}/split-bill`);
|
||||
}, [navigate, subdomain]);
|
||||
|
||||
const handlePlaceOrderClick = useCallback(async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user