From c0cd500923b12f184f9fcebad2caa19255e0903e Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Tue, 12 Jul 2022 12:02:41 +0430 Subject: [PATCH] update src/views/Dashboard/layouts/Main/Addresses/index.js and src/views/Dashboard/layouts/Main/index.js --- src/views/Dashboard/layouts/Main/Addresses/index.js | 12 +++++++----- src/views/Dashboard/layouts/Main/index.js | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/Dashboard/layouts/Main/Addresses/index.js b/src/views/Dashboard/layouts/Main/Addresses/index.js index 1b68809..aa8db18 100644 --- a/src/views/Dashboard/layouts/Main/Addresses/index.js +++ b/src/views/Dashboard/layouts/Main/Addresses/index.js @@ -8,16 +8,17 @@ import { menu, } from "../../../../../redux/actions"; -import Loading from "../../../../../components/Loading"; - //components import Button from "../../../../../components/Button"; import { Link, useNavigate } from "react-router-dom"; -import editButton from "../../../../../assets/icons/edit.svg"; -import trash from "../../../../../assets/icons/trash.svg"; +import Loading from "../../../../../components/Loading"; import Empty from "../../../../../components/Empty"; import FloatingButton from "../../../../../components/FloatingButton"; +//assets +import editButton from "../../../../../assets/icons/edit.svg"; +import trash from "../../../../../assets/icons/trash.svg"; + const ProfileAddress = ({ addresses, update, @@ -32,6 +33,7 @@ const ProfileAddress = ({ setMenu, setDialog, deleteAddress, + isDashboard }) => { const navigation = useNavigate(); @@ -221,7 +223,7 @@ const mapStateToProps = (state) => ({ userId: state.user.status?.id, userAddressId: state.userFactor.info?.userAddressId, addresses: state.userAddress.list, - isMobile: state.publicApi.isMobile, + isMobile: state.config.device === 'mobile', isDark: state.publicApi.isDark, loading: state.userFactor.loading, }); diff --git a/src/views/Dashboard/layouts/Main/index.js b/src/views/Dashboard/layouts/Main/index.js index 65714e4..fb98b27 100644 --- a/src/views/Dashboard/layouts/Main/index.js +++ b/src/views/Dashboard/layouts/Main/index.js @@ -23,7 +23,7 @@ const views = { ), favorites: , - addresses: , + addresses: , profile: , addressForm:
, };