From 800f85613c0aac461721b19624a1a80cb6dd22e1 Mon Sep 17 00:00:00 2001 From: mahdi Date: Mon, 20 Jun 2022 12:13:47 +0430 Subject: [PATCH] kari kardam ke karbar entekhab kone ke mikhad baraye khodesh ersal shavad ya baaraye yek nafare dige | 120 --- src/views/Address/index.js | 314 +++++++++++++------------------------ 1 file changed, 108 insertions(+), 206 deletions(-) diff --git a/src/views/Address/index.js b/src/views/Address/index.js index e0acf90..72bd6de 100644 --- a/src/views/Address/index.js +++ b/src/views/Address/index.js @@ -349,161 +349,122 @@ export const Address = ({ }`} >
{ setActiveCheckbox(!activeCheckbox); }} > - {activeCheckbox ? "mahdi" : "iran"} +
+
+
+

+ {activeCheckbox === false + ? " گیرنده فرد دیگری است " + : " برای خودم "} + + {activeCheckbox + ? "(در صورتی که فرد گیرنده شما نیستید اینجا کلیک کنید)" + : "(در صورتی که فرد گیرنده خودتون هستید اینجا کلیک کنید)"} + +

+ {console.log(activeCheckbox)} + {activeCheckbox === false ? ( + <> +
- { - activeCheckbox === true ? ( - <> -
+ val} + name="firstName" + onChange={(name, value) => + profilePage + ? setProfileFields({ ...profileFields, firstName: value }) + : onChange(name, value) + } + value={ + profilePage + ? profileFields.firstName || user.firstName + : addressFields?.firstName + } + align="text-right" + direction="rtl" /> -
- val} - name="firstName" - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, firstName: value }) - : onChange(name, value) - } - value={ - profilePage - ? profileFields.firstName || user.firstName - : addressFields?.firstName - } - align="text-right" - direction="rtl" - /> - - val} - name="lastName" - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, lastName: value }) - : onChange(name, value) - } - value={ - profilePage - ? profileFields.lastName || user.lastName - : addressFields?.lastName - } - align="text-right" - direction="rtl" - /> -
- -
val} + name="lastName" + onChange={(name, value) => + profilePage + ? setProfileFields({ ...profileFields, lastName: value }) + : onChange(name, value) + } + value={ + profilePage + ? profileFields.lastName || user.lastName + : addressFields?.lastName + } + align="text-right" + direction="rtl" /> + -
- onInput.phonenumber(val)} - name="cellphone" - value={ - profilePage - ? profileFields.cellphone || user.cellphone - : addressFields?.cellphone - } - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, cellphone: value }) - : onChange(name, value) - } - align="text-right" - direction="ltr" - maxLength={11} - /> - onInput.numberOnly(val)} - name="phone" - value={ - profilePage - ? profileFields.phone || user.phone - : addressFields?.phone - } - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, phone: value }) - : onChange(name, value) - } - align="text-right" - direction="ltr" - maxLength={11} - /> -
- - ) : ( -

mahdi mahdi mahdi

- ) - //

mahdi

:

mahdiiii

- } - - {/*
*/} - - {/*
- val} - name="firstName" - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, firstName: value }) - : onChange(name, value) - } - value={ - profilePage - ? profileFields.firstName || user.firstName - : addressFields?.firstName - } - align="text-right" - direction="rtl" - /> +
- val} - name="lastName" - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, lastName: value }) - : onChange(name, value) - } - value={ - profilePage - ? profileFields.lastName || user.lastName - : addressFields?.lastName - } - align="text-right" - direction="rtl" - /> -
*/} +
+ onInput.phonenumber(val)} + name="cellphone" + value={ + profilePage + ? profileFields.cellphone || user.cellphone + : addressFields?.cellphone + } + onChange={(name, value) => + profilePage + ? setProfileFields({ ...profileFields, cellphone: value }) + : onChange(name, value) + } + align="text-right" + direction="ltr" + maxLength={11} + /> + onInput.numberOnly(val)} + name="phone" + value={ + profilePage + ? profileFields.phone || user.phone + : addressFields?.phone + } + onChange={(name, value) => + profilePage + ? setProfileFields({ ...profileFields, phone: value }) + : onChange(name, value) + } + align="text-right" + direction="ltr" + maxLength={11} + /> +
+ + ) : null} {profilePage && ( )} - {!isMobile && ( - <> -
-
- - )} - - {/*
- -
- onInput.phonenumber(val)} - name="cellphone" - value={ - profilePage - ? profileFields.cellphone || user.cellphone - : addressFields?.cellphone - } - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, cellphone: value }) - : onChange(name, value) - } - align="text-right" - direction="ltr" - maxLength={11} - /> - onInput.numberOnly(val)} - name="phone" - value={ - profilePage - ? profileFields.phone || user.phone - : addressFields?.phone - } - onChange={(name, value) => - profilePage - ? setProfileFields({ ...profileFields, phone: value }) - : onChange(name, value) - } - align="text-right" - direction="ltr" - maxLength={11} - /> -
*/} + {!isMobile && <>} - {!isMobile && ( - <> -
-
- - )} + {!isMobile && <>}
-
+
{console.log(city)}