working on gift flow
This commit is contained in:
@@ -7,21 +7,30 @@ import { useAppDispatch, useAppSelector } from "redux/hooks";
|
||||
export default function PhoneCard() {
|
||||
const { t } = useTranslation();
|
||||
const dispatch = useAppDispatch();
|
||||
const { phone } = useAppSelector(selectCart);
|
||||
const { phone, orderType } = useAppSelector(selectCart);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ProInputCard title={t("checkout.phoneNumber")}>
|
||||
<Form.Item name="phone" required rules={[{ required: true, message: t("checkout.pleaseEnterPhoneNumber") }]}>
|
||||
<Input
|
||||
placeholder={t("checkout.phoneNumber")}
|
||||
size="large"
|
||||
autoFocus={false}
|
||||
style={{ padding: "7px 11px", height: 50, borderRadius: 888 }}
|
||||
value={phone}
|
||||
onChange={(e) => dispatch(updatePhone(e.target.value))}
|
||||
/>
|
||||
</Form.Item>
|
||||
</ProInputCard>
|
||||
</>
|
||||
orderType !== "gift" && (
|
||||
<>
|
||||
<ProInputCard title={t("checkout.phoneNumber")}>
|
||||
<Form.Item
|
||||
name="phone"
|
||||
required
|
||||
rules={[
|
||||
{ required: true, message: t("checkout.pleaseEnterPhoneNumber") },
|
||||
]}
|
||||
>
|
||||
<Input
|
||||
placeholder={t("checkout.phoneNumber")}
|
||||
size="large"
|
||||
autoFocus={false}
|
||||
style={{ padding: "7px 11px", height: 50, borderRadius: 888 }}
|
||||
value={phone}
|
||||
onChange={(e) => dispatch(updatePhone(e.target.value))}
|
||||
/>
|
||||
</Form.Item>
|
||||
</ProInputCard>
|
||||
</>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user