preserve cart & checkout elment on refersh
This commit is contained in:
@@ -55,7 +55,6 @@ export default function CardDetailsPage() {
|
||||
navigate(`/${subdomain}/checkout`);
|
||||
}, [subdomain]);
|
||||
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<ProHeader>{t("cardDetails.title")}</ProHeader>
|
||||
@@ -132,7 +131,7 @@ export default function CardDetailsPage() {
|
||||
layout="vertical"
|
||||
style={{ display: "flex", flexDirection: "column", gap: 16 }}
|
||||
>
|
||||
<GiftAmountCard />
|
||||
{giftDetails?.giftType !== "items" && <GiftAmountCard />}
|
||||
<ReceivernformationCard />
|
||||
<SenderformationCard />
|
||||
<TimeEstimateCard />
|
||||
|
||||
@@ -5,7 +5,6 @@ import { useTranslation } from "react-i18next";
|
||||
import { useAppDispatch, useAppSelector } from "redux/hooks";
|
||||
import { Checkbox, Form, Input } from "antd";
|
||||
import styles from "./SenderformationCard.module.css";
|
||||
import TextArea from "antd/es/input/TextArea";
|
||||
import ProText from "components/ProText";
|
||||
|
||||
export default function SenderformationCard() {
|
||||
@@ -14,9 +13,9 @@ export default function SenderformationCard() {
|
||||
const { giftDetails } = useAppSelector(selectCart);
|
||||
|
||||
return (
|
||||
<ProInputCard title={t("cardDetails.receiverInformation")}>
|
||||
<ProInputCard title={t("cardDetails.yourInformation")}>
|
||||
<div className={styles.customerInformationCard}>
|
||||
<Form.Item name="receiverName">
|
||||
<Form.Item name="senderName">
|
||||
<Input
|
||||
placeholder={t("cardDetails.yourName")}
|
||||
size="large"
|
||||
@@ -29,7 +28,7 @@ export default function SenderformationCard() {
|
||||
/>
|
||||
</Form.Item>
|
||||
<ProPhoneInput
|
||||
propName="yourPhone"
|
||||
propName="senderPhone"
|
||||
value={giftDetails?.senderPhone}
|
||||
onChange={(e) => {
|
||||
dispatch(updateGiftDetails({ senderPhone: e }));
|
||||
|
||||
Reference in New Issue
Block a user