gift: fix flow and update antd element

This commit is contained in:
2025-12-18 22:49:56 +03:00
parent 8e857c88f6
commit 58b2258339
5 changed files with 90 additions and 90 deletions

View File

@@ -110,7 +110,7 @@ export function GiftBottomSheet({
<ProPhoneInput <ProPhoneInput
propName="senderPhone" propName="senderPhone"
label={t("address.receiverPhone")} label={t("address.senderPhone")}
/> />
<Form.Item <Form.Item

View File

@@ -43,7 +43,7 @@ export default function OrderSummary() {
<Card className={`${styles.orderSummary}`}> <Card className={`${styles.orderSummary}`}>
<ProTitle style={{ fontSize: 18 }}>{t("cart.orderSummary")}</ProTitle> <ProTitle style={{ fontSize: 18 }}>{t("cart.orderSummary")}</ProTitle>
<Divider style={{ margin: "15px 0 15px 0" }} /> <Divider style={{ margin: "15px 0 15px 0" }} />
<Space direction="vertical" style={{ width: "100%" }}> <Space orientation="vertical" style={{ width: "100%" }}>
<div className={styles.summaryRow}> <div className={styles.summaryRow}>
<ProText type="secondary">{t("cart.basketTotal")}</ProText> <ProText type="secondary">{t("cart.basketTotal")}</ProText>
<ArabicPrice price={subtotal} /> <ArabicPrice price={subtotal} />

View File

@@ -88,7 +88,7 @@ const PaymentMethods = () => {
}} }}
size="large" size="large"
> >
<Space direction="vertical" style={{ width: "100%" }}> <Space orientation="vertical" style={{ width: "100%" }}>
{options.map((option) => ( {options.map((option) => (
<div key={option.value}> <div key={option.value}>
<Radio <Radio

View File

@@ -69,7 +69,6 @@ export default function HeaderMenuDrawer() {
maskClosable={false} maskClosable={false}
onClose={closeMobileMenu} onClose={closeMobileMenu}
open={mobileMenuOpen} open={mobileMenuOpen}
width={isMobile ? "50%" : "25%"}
styles={{ styles={{
body: { body: {
padding: 0, padding: 0,
@@ -80,6 +79,9 @@ export default function HeaderMenuDrawer() {
themeName === "dark" ? "#374151" : "#e5e7eb" themeName === "dark" ? "#374151" : "#e5e7eb"
}`, }`,
}, },
wrapper: {
width: isMobile ? "50%" : "25%",
},
}} }}
closeIcon={null} closeIcon={null}
> >

View File

@@ -15,8 +15,6 @@ export function GiftCard() {
return ( return (
<> <>
<ProInputCard title={t("address.giftDetails")}> <ProInputCard title={t("address.giftDetails")}>
<ProPhoneInput <ProPhoneInput
propName="receiverPhone" propName="receiverPhone"
label={t("address.receiverPhone")} label={t("address.receiverPhone")}
@@ -36,9 +34,9 @@ export function GiftCard() {
}} }}
rows={2} rows={2}
autoFocus={false} autoFocus={false}
value={order?.senderName} value={order?.message}
onChange={(e) => { onChange={(e) => {
dispatch(updateOrder({ ...order, senderName: e.target.value })); dispatch(updateOrder({ ...order, message: e.target.value }));
}} }}
/> />
</Form.Item> </Form.Item>
@@ -57,16 +55,20 @@ export function GiftCard() {
height: 50, height: 50,
}} }}
autoFocus={false} autoFocus={false}
value={order?.senderPhone} value={order?.senderName}
onChange={(e) => { onChange={(e) => {
dispatch(updateOrder({ ...order, senderPhone: e.target.value })); dispatch(updateOrder({ ...order, senderName: e.target.value }));
}} }}
/> />
</Form.Item> </Form.Item>
<ProPhoneInput <ProPhoneInput
propName="senderPhone" propName="senderPhone"
label={t("address.receiverPhone")} label={t("address.senderPhone")}
value={order?.senderPhone}
onChange={(e) => {
dispatch(updateOrder({ ...order, senderPhone: e }));
}}
/> />
<Form.Item <Form.Item
@@ -90,11 +92,7 @@ export function GiftCard() {
/> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item name="isSecret" colon={false}>
name="isSecret"
rules={[{ required: true, message: "" }]}
colon={false}
>
<Checkbox <Checkbox
style={{ style={{
fontSize: 14, fontSize: 14,