|
@@ -3,7 +3,7 @@ import { View, Text, Image, TouchableOpacity, Platform } from 'react-native';
|
|
|
import ImageView from 'better-react-native-image-viewing';
|
|
|
import { styles } from '../RegionViewScreen/styles';
|
|
|
import { Button, HorizontalTabView, Loading, Modal as ReactModal } from 'src/components';
|
|
|
-import { useFocusEffect } from '@react-navigation/native';
|
|
|
+import { CommonActions, useFocusEffect } from '@react-navigation/native';
|
|
|
import { Colors } from 'src/theme';
|
|
|
import { ScrollView } from 'react-native-gesture-handler';
|
|
|
|
|
@@ -28,6 +28,7 @@ import HouseSvg from 'assets/icons/house.svg';
|
|
|
import EditSvg from 'assets/icons/travels-screens/pen-to-square.svg';
|
|
|
import CheckSvg from 'assets/icons/travels-screens/circle-check.svg';
|
|
|
import CheckRegularSvg from 'assets/icons/travels-screens/circle-check-regular.svg';
|
|
|
+import MapSvg from 'assets/icons/travels-screens/map-location.svg';
|
|
|
|
|
|
const CountryViewScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
const countryId = route.params?.regionId;
|
|
@@ -220,6 +221,35 @@ const CountryViewScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
<ChevronLeft fill={Colors.WHITE} />
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
+ {route.params?.isTravelsScreen ? (
|
|
|
+ <TouchableOpacity
|
|
|
+ onPress={() => {
|
|
|
+ navigation.dispatch(
|
|
|
+ CommonActions.reset({
|
|
|
+ index: 1,
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: NAVIGATION_PAGES.IN_APP_MAP_TAB,
|
|
|
+ state: {
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: NAVIGATION_PAGES.MAP_TAB,
|
|
|
+ params: { id: countryId, type: 'countries' }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ style={styles.goToMapBtn}
|
|
|
+ >
|
|
|
+ <View style={styles.chevronWrapper}>
|
|
|
+ <MapSvg fill={Colors.WHITE} />
|
|
|
+ </View>
|
|
|
+ </TouchableOpacity>
|
|
|
+ ) : null}
|
|
|
<ScrollView
|
|
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
|
nestedScrollEnabled={true}
|