update src/views/Dashboard/layouts/Main/Addresses/index.js and src/views/Dashboard/layouts/Main/index.js

master
Reza_ashrafi 2 years ago
parent 9da89fcc41
commit c0cd500923
  1. 12
      src/views/Dashboard/layouts/Main/Addresses/index.js
  2. 2
      src/views/Dashboard/layouts/Main/index.js

@ -8,16 +8,17 @@ import {
menu, menu,
} from "../../../../../redux/actions"; } from "../../../../../redux/actions";
import Loading from "../../../../../components/Loading";
//components //components
import Button from "../../../../../components/Button"; import Button from "../../../../../components/Button";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import editButton from "../../../../../assets/icons/edit.svg"; import Loading from "../../../../../components/Loading";
import trash from "../../../../../assets/icons/trash.svg";
import Empty from "../../../../../components/Empty"; import Empty from "../../../../../components/Empty";
import FloatingButton from "../../../../../components/FloatingButton"; import FloatingButton from "../../../../../components/FloatingButton";
//assets
import editButton from "../../../../../assets/icons/edit.svg";
import trash from "../../../../../assets/icons/trash.svg";
const ProfileAddress = ({ const ProfileAddress = ({
addresses, addresses,
update, update,
@ -32,6 +33,7 @@ const ProfileAddress = ({
setMenu, setMenu,
setDialog, setDialog,
deleteAddress, deleteAddress,
isDashboard
}) => { }) => {
const navigation = useNavigate(); const navigation = useNavigate();
@ -221,7 +223,7 @@ const mapStateToProps = (state) => ({
userId: state.user.status?.id, userId: state.user.status?.id,
userAddressId: state.userFactor.info?.userAddressId, userAddressId: state.userFactor.info?.userAddressId,
addresses: state.userAddress.list, addresses: state.userAddress.list,
isMobile: state.publicApi.isMobile, isMobile: state.config.device === 'mobile',
isDark: state.publicApi.isDark, isDark: state.publicApi.isDark,
loading: state.userFactor.loading, loading: state.userFactor.loading,
}); });

@ -23,7 +23,7 @@ const views = {
</div> </div>
), ),
favorites: <Favorites />, favorites: <Favorites />,
addresses: <Addresses />, addresses: <Addresses isDashboard={true} />,
profile: <Profile />, profile: <Profile />,
addressForm: <Address />, addressForm: <Address />,
}; };

Loading…
Cancel
Save