gift: working on UI ans styles
This commit is contained in:
@@ -2,7 +2,11 @@ import { Checkbox, Form, Input } from "antd";
|
||||
import ProInputCard from "components/ProInputCard/ProInputCard";
|
||||
import ProPhoneInput from "components/ProPhoneInput";
|
||||
import ProText from "components/ProText";
|
||||
import { selectCart, updateOrder } from "features/order/orderSlice";
|
||||
import {
|
||||
selectCart,
|
||||
updateGiftDetails,
|
||||
updateOrder,
|
||||
} from "features/order/orderSlice";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAppDispatch, useAppSelector } from "redux/hooks";
|
||||
|
||||
@@ -20,7 +24,7 @@ export function GiftCard() {
|
||||
label={t("address.receiverPhone")}
|
||||
value={order?.receiverPhone}
|
||||
onChange={(e) => {
|
||||
dispatch(updateOrder({ ...order, receiverPhone: e }));
|
||||
dispatch(updateGiftDetails({ receiverPhone: e }));
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -36,7 +40,7 @@ export function GiftCard() {
|
||||
autoFocus={false}
|
||||
value={order?.message}
|
||||
onChange={(e) => {
|
||||
dispatch(updateOrder({ ...order, message: e.target.value }));
|
||||
dispatch(updateGiftDetails({ message: e.target.value }));
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -57,7 +61,7 @@ export function GiftCard() {
|
||||
autoFocus={false}
|
||||
value={order?.senderName}
|
||||
onChange={(e) => {
|
||||
dispatch(updateOrder({ ...order, senderName: e.target.value }));
|
||||
dispatch(updateGiftDetails({ senderName: e.target.value }));
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -67,7 +71,7 @@ export function GiftCard() {
|
||||
label={t("address.senderPhone")}
|
||||
value={order?.senderPhone}
|
||||
onChange={(e) => {
|
||||
dispatch(updateOrder({ ...order, senderPhone: e }));
|
||||
dispatch(updateGiftDetails({ senderPhone: e }));
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -87,7 +91,7 @@ export function GiftCard() {
|
||||
autoFocus={false}
|
||||
value={order?.senderEmail}
|
||||
onChange={(e) => {
|
||||
dispatch(updateOrder({ ...order, senderEmail: e.target.value }));
|
||||
dispatch(updateGiftDetails({ senderEmail: e.target.value }));
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -100,7 +104,7 @@ export function GiftCard() {
|
||||
autoFocus={false}
|
||||
checked={order?.isSecret}
|
||||
onChange={(e) => {
|
||||
dispatch(updateOrder({ ...order, isSecret: e.target.checked }));
|
||||
dispatch(updateGiftDetails({ isSecret: e.target.checked }));
|
||||
}}
|
||||
>
|
||||
<ProText>{t("address.keepMyNameSecret")}</ProText>
|
||||
|
||||
Reference in New Issue
Block a user