change url param name to "subdomain"
This commit is contained in:
@@ -13,7 +13,7 @@ interface CartFooterProps {
|
||||
export default function CartFooter({ form }: CartFooterProps) {
|
||||
const { t } = useTranslation();
|
||||
const { items } = useAppSelector(selectCart);
|
||||
const { id } = useParams();
|
||||
const { subdomain } = useParams();
|
||||
const orderType = localStorage.getItem("orderType");
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function CartFooter({ form }: CartFooterProps) {
|
||||
else {
|
||||
try {
|
||||
await form.validateFields();
|
||||
navigate(`/${id}/checkout`);
|
||||
navigate(`/${subdomain}/checkout`);
|
||||
} catch (error) {
|
||||
console.log("Form validation failed:", error);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ export default function CartFooter({ form }: CartFooterProps) {
|
||||
return (
|
||||
<div className={styles.cartFooter}>
|
||||
<Link
|
||||
to={`/${id}/menu?${orderType ? `orderType=${orderType}` : ""}`}
|
||||
to={`/${subdomain}/menu?${orderType ? `orderType=${orderType}` : ""}`}
|
||||
style={{
|
||||
width: "100%",
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user