update src/views/Address/index.js, src/views/Dashboard/layouts/Main/index.js and src/views/ShoppingCart/index.js

temp
mahdi 2 years ago
parent 5f92293b2a
commit 31a19d10ad
  1. 12
      src/views/Address/index.js
  2. 6
      src/views/Dashboard/layouts/Main/index.js

@ -87,6 +87,7 @@ export const Address = ({
}, [addressInfo]);
useEffect(() => {
console.log({ addressFields });
if (addressFields?.provinceId) {
getCity({
provinceId: provinces.filter(
@ -96,6 +97,17 @@ export const Address = ({
}
}, [addressFields]);
useEffect(() => {
console.log({ profileFields });
if (profileFields?.provinceId) {
getCity({
provinceId: provinces.filter(
(province) => province.name === profileFields?.provinceId
)[0]?.id,
});
}
}, [profileFields]);
const onChange = (name, value) => {
setAddressFields({ ...addressFields, [name]: value });
};

@ -19,9 +19,9 @@ const views = {
<Ticket />
</div>
),
favorites : <Favorites />,
addresses : <Addresses />,
profile : <Address profilePage={true} />,
favorites: <Favorites />,
addresses: <Addresses />,
profile: <Address profilePage={true} />,
};
export const Main = ({ setHeaderOptions, page }) => {

Loading…
Cancel
Save