|
|
|
@ -8,7 +8,7 @@ import { |
|
|
|
|
} from "react-native"; |
|
|
|
|
import React from "react"; |
|
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
import {asyncAwesomeAlert} from "../../../utils/AsyncWrappers"; |
|
|
|
|
import { asyncAwesomeAlert } from "../../../utils/AsyncWrappers"; |
|
|
|
|
import { Ionicons, Entypo } from "@expo/vector-icons"; |
|
|
|
|
import { useNavigation } from "@react-navigation/native"; |
|
|
|
|
import { userFactor, userAddress } from "../../../redux/actions"; |
|
|
|
@ -59,7 +59,7 @@ const Address = ({ |
|
|
|
|
borderColor: active ? Colors.theme1.greenCF : Colors.theme1.grayE3, |
|
|
|
|
}, |
|
|
|
|
tw( |
|
|
|
|
`flex flex-row-reverse items-center w-full px-3 rounded-sm mt-2 ${ |
|
|
|
|
`flex flex-row-reverse items-center w-full px-3 rounded-sm mt-2 mb-4 ${ |
|
|
|
|
mobile ? "py-3.5" : "py-4" |
|
|
|
|
}` |
|
|
|
|
), |
|
|
|
@ -134,7 +134,7 @@ const Address = ({ |
|
|
|
|
onConfirm: () => deleteItem({ id: address?.id }), |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
style={tw('h-full')} |
|
|
|
|
style={tw("h-full")} |
|
|
|
|
> |
|
|
|
|
<Ionicons |
|
|
|
|
name="trash-bin" |
|
|
|
@ -156,6 +156,7 @@ const Address = ({ |
|
|
|
|
return ( |
|
|
|
|
<View style={tw("w-full mt-2")}> |
|
|
|
|
{addresses?.length ? ( |
|
|
|
|
<React.Fragment> |
|
|
|
|
<Text |
|
|
|
|
style={{ |
|
|
|
|
fontSize: mobile ? fontSize.base : fontSize.base, |
|
|
|
@ -166,7 +167,6 @@ const Address = ({ |
|
|
|
|
> |
|
|
|
|
لطفا آدرس مورد نظر را انتخاب کنید. |
|
|
|
|
</Text> |
|
|
|
|
) : null} |
|
|
|
|
<View style={tw("p-0 mt-2 flex")}> |
|
|
|
|
{addresses?.map((address, index) => ( |
|
|
|
|
<Location |
|
|
|
@ -176,6 +176,9 @@ const Address = ({ |
|
|
|
|
/> |
|
|
|
|
))} |
|
|
|
|
</View> |
|
|
|
|
</React.Fragment> |
|
|
|
|
) : null} |
|
|
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
style={[ |
|
|
|
|
{ |
|
|
|
@ -186,7 +189,7 @@ const Address = ({ |
|
|
|
|
borderWidth: 1.5, |
|
|
|
|
}, |
|
|
|
|
tw( |
|
|
|
|
`flex flex-row-reverse justify-center py-3 rounded-sm items-center w-full mt-4` |
|
|
|
|
`flex flex-row-reverse justify-center py-3 rounded-sm items-center w-full` |
|
|
|
|
), |
|
|
|
|
]} |
|
|
|
|
onPress={() => navigation.push("CreateAddress")} |
|
|
|
@ -224,7 +227,7 @@ const mapStateToProps = (state) => ({ |
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
|
update: userFactor.update, |
|
|
|
|
deleteItem: userAddress.update |
|
|
|
|
deleteItem: userAddress.update, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Address); |
|
|
|
|