This commit is contained in:
2026-01-14 21:30:32 +03:00
parent 3a72b8e933
commit ce68b8b978
6 changed files with 52 additions and 30 deletions

View File

@@ -6,7 +6,7 @@ import CancelPopupIcon from "components/Icons/CancelPopupIcon";
import NextIcon from "components/Icons/NextIcon";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom";
import { useNavigate, useParams } from "react-router-dom";
import { useCancelOrderMutation } from "redux/api/others";
import { useAppSelector } from "redux/hooks";
import { ProBottomSheet } from "../ProBottomSheet/ProBottomSheet";
@@ -18,7 +18,8 @@ export function CancelOrderBottomSheet() {
const { t } = useTranslation();
const [isOpen, setIsOpen] = useState(false);
const { isRTL } = useAppSelector((state) => state.locale);
const { orderId } = useParams();
const { orderId, subdomain } = useParams();
const navigate = useNavigate();
const [cancelOrder] = useCancelOrderMutation();
@@ -31,6 +32,7 @@ export function CancelOrderBottomSheet() {
message.error(res.error.data.message);
} else {
message.success(res.data.message);
navigate(`/${subdomain}`);
}
});
};

View File

@@ -8,6 +8,7 @@ interface InputCardProps {
name: string;
placeholder: string;
value: string;
required?: boolean;
}
export default function InputCard({
@@ -15,6 +16,7 @@ export default function InputCard({
name,
placeholder,
value,
required = false,
}: InputCardProps) {
const dispatch = useAppDispatch();
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
@@ -24,9 +26,8 @@ export default function InputCard({
<>
<ProInputCard title={title} dividerStyle={{ margin: "5px 0 0 0" }}>
<Form.Item
label={title}
name={name}
style={{ position: "relative", top: -5 }}
rules={[{ required }]}
>
<Input
placeholder={placeholder}