refactor the use of plain string order types

This commit is contained in:
2025-10-28 13:29:52 +03:00
parent 7aa686166b
commit 1abb63e8bd
16 changed files with 73 additions and 58 deletions

View File

@@ -3,6 +3,7 @@ import ProPhoneInput from "components/ProPhoneInput";
import { selectCart, updatePhone } from "features/order/orderSlice";
import { useTranslation } from "react-i18next";
import { useAppDispatch, useAppSelector } from "redux/hooks";
import { OrderType } from "pages/checkout/hooks/types.ts";
export default function PhoneCard() {
const { t } = useTranslation();
@@ -10,7 +11,7 @@ export default function PhoneCard() {
const { phone, orderType } = useAppSelector(selectCart);
return (
orderType !== "gift" && (
orderType !== OrderType.Gift && (
<>
<ProInputCard title={t("checkout.phoneNumber")}>
<ProPhoneInput