refactor the use of plain string order types
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user