|
@@ -1,8 +1,13 @@
|
|
|
import React, { FC, useCallback, useEffect, useState } from 'react';
|
|
import React, { FC, useCallback, useEffect, useState } from 'react';
|
|
|
import { View, Text, Image, TouchableOpacity, Platform, FlatList } from 'react-native';
|
|
import { View, Text, Image, TouchableOpacity, Platform, FlatList } from 'react-native';
|
|
|
-import ImageView from 'better-react-native-image-viewing';
|
|
|
|
|
import { styles } from '../RegionViewScreen/styles';
|
|
import { styles } from '../RegionViewScreen/styles';
|
|
|
-import { Button, HorizontalTabView, Loading, Modal as ReactModal } from 'src/components';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ Button,
|
|
|
|
|
+ CustomImageViewer,
|
|
|
|
|
+ HorizontalTabView,
|
|
|
|
|
+ Loading,
|
|
|
|
|
+ Modal as ReactModal
|
|
|
|
|
+} from 'src/components';
|
|
|
import { CommonActions, useFocusEffect } from '@react-navigation/native';
|
|
import { CommonActions, useFocusEffect } from '@react-navigation/native';
|
|
|
import { Colors } from 'src/theme';
|
|
import { Colors } from 'src/theme';
|
|
|
import { ScrollView } from 'react-native-gesture-handler';
|
|
import { ScrollView } from 'react-native-gesture-handler';
|
|
@@ -96,7 +101,7 @@ const CountryViewScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
routesData && staticGroups.push(...routesData);
|
|
routesData && staticGroups.push(...routesData);
|
|
|
|
|
|
|
|
setPhotos(
|
|
setPhotos(
|
|
|
- data?.data?.photos?.map((item) => ({
|
|
|
|
|
|
|
+ data?.data?.photos?.slice(0, 100).map((item) => ({
|
|
|
...item,
|
|
...item,
|
|
|
uriSmall: `${API_HOST}/ajax/pic/${item.id}/small`,
|
|
uriSmall: `${API_HOST}/ajax/pic/${item.id}/small`,
|
|
|
uri: `${API_HOST}/ajax/pic/${item.id}/full`
|
|
uri: `${API_HOST}/ajax/pic/${item.id}/full`
|
|
@@ -663,14 +668,14 @@ const CountryViewScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
)} */}
|
|
)} */}
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
- <ImageView
|
|
|
|
|
|
|
+ <CustomImageViewer
|
|
|
images={photos}
|
|
images={photos}
|
|
|
imageIndex={currentImageIndex}
|
|
imageIndex={currentImageIndex}
|
|
|
visible={isModalVisible}
|
|
visible={isModalVisible}
|
|
|
onRequestClose={() => setModalVisible(false)}
|
|
onRequestClose={() => setModalVisible(false)}
|
|
|
- backgroundColor={Colors.DARK_BLUE}
|
|
|
|
|
onImageIndexChange={setActiveIndex}
|
|
onImageIndexChange={setActiveIndex}
|
|
|
- FooterComponent={({ imageIndex }) => (
|
|
|
|
|
|
|
+ backgroundColor={Colors.DARK_BLUE}
|
|
|
|
|
+ renderFooter={(imageIndex: number) => (
|
|
|
<View style={styles.imageFooter}>
|
|
<View style={styles.imageFooter}>
|
|
|
<Text style={styles.imageDescription}>{photos[imageIndex].title}</Text>
|
|
<Text style={styles.imageDescription}>{photos[imageIndex].title}</Text>
|
|
|
<TouchableOpacity
|
|
<TouchableOpacity
|