|
|
|
@ -7,11 +7,11 @@ 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"; |
|
|
|
|
|
|
|
|
@ -81,6 +81,8 @@ const Location = ({ |
|
|
|
|
setMenu, |
|
|
|
|
setDialog, |
|
|
|
|
deleteAddress, |
|
|
|
|
userAddressId, |
|
|
|
|
loading, |
|
|
|
|
}) => { |
|
|
|
|
const [locationMenu, setLocationMenu] = React.useState(false); |
|
|
|
|
|
|
|
|
@ -123,13 +125,17 @@ const Location = ({ |
|
|
|
|
} |
|
|
|
|
> |
|
|
|
|
<div className="w-full flex items-center justify-between"> |
|
|
|
|
<div className="w-4 h-4 flex flex-col items-center justify-center ml-1 bg-gray-200 rounded-full"> |
|
|
|
|
<div |
|
|
|
|
className={`w-2 h-2 rounded-full ${ |
|
|
|
|
active === true ? "bg-blueC0" : "" |
|
|
|
|
}`}
|
|
|
|
|
></div> |
|
|
|
|
</div> |
|
|
|
|
{loading && userAddressId !== address?.id ? ( |
|
|
|
|
<Loading size={2} color="bg-red-400" /> |
|
|
|
|
) : ( |
|
|
|
|
<div className="w-4 h-4 flex flex-col items-center justify-center ml-1 bg-gray-200 rounded-full"> |
|
|
|
|
<div |
|
|
|
|
className={`w-2 h-2 rounded-full ${ |
|
|
|
|
active === true ? "bg-blueC0" : "" |
|
|
|
|
}`}
|
|
|
|
|
></div> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
<div className="flex flex-col flex-1 mr-2"> |
|
|
|
|
{active && ( |
|
|
|
|
<div className="w-full flex justify-between mb-3"> |
|
|
|
@ -192,6 +198,7 @@ const mapStateToProps = (state) => ({ |
|
|
|
|
addresses: state.userAddress.list, |
|
|
|
|
isMobile: state.publicApi.isMobile, |
|
|
|
|
isDark: state.publicApi.isDark, |
|
|
|
|
loading: state.userFactor.loading, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
|