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)}