|
@@ -1,11 +1,11 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
3
|
3
|
import * as React from 'react';
|
4
|
|
-import {Image, ScrollView, TouchableOpacity, View} from 'react-native';
|
|
4
|
+import {ScrollView, View} from 'react-native';
|
5
|
5
|
import HTML from "react-native-render-html";
|
6
|
6
|
import {Linking} from "expo";
|
7
|
|
-import {Avatar, Card, Paragraph, Portal, withTheme} from 'react-native-paper';
|
8
|
|
-import ImageView from "react-native-image-viewing";
|
|
7
|
+import {Avatar, Card, Paragraph, withTheme} from 'react-native-paper';
|
|
8
|
+import ImageModal from 'react-native-image-modal';
|
9
|
9
|
|
10
|
10
|
type Props = {
|
11
|
11
|
navigation: Object,
|
|
@@ -42,14 +42,6 @@ class ClubDisplayScreen extends React.Component<Props, State> {
|
42
|
42
|
this.props.navigation.setOptions({title: this.displayData.name})
|
43
|
43
|
}
|
44
|
44
|
|
45
|
|
- showImageModal = () => {
|
46
|
|
- this.setState({imageModalVisible: true});
|
47
|
|
- };
|
48
|
|
-
|
49
|
|
- hideImageModal = () => {
|
50
|
|
- this.setState({imageModalVisible: false});
|
51
|
|
- };
|
52
|
|
-
|
53
|
45
|
getResponsiblesRender(resp: Array<string>) {
|
54
|
46
|
let final = [];
|
55
|
47
|
for (let i = 0; i < resp.length; i++) {
|
|
@@ -63,7 +55,7 @@ class ClubDisplayScreen extends React.Component<Props, State> {
|
63
|
55
|
left={(props) => <Avatar.Icon
|
64
|
56
|
style={{backgroundColor: 'transparent'}}
|
65
|
57
|
{...props}
|
66
|
|
- icon="account-tie" />}
|
|
58
|
+ icon="account-tie"/>}
|
67
|
59
|
/>
|
68
|
60
|
<Card.Content>
|
69
|
61
|
{final}
|
|
@@ -76,12 +68,18 @@ class ClubDisplayScreen extends React.Component<Props, State> {
|
76
|
68
|
return (
|
77
|
69
|
<ScrollView style={{paddingLeft: 5, paddingRight: 5}}>
|
78
|
70
|
{this.displayData.logo !== null ?
|
79
|
|
- <TouchableOpacity
|
80
|
|
- onPress={this.showImageModal}
|
81
|
|
- style={{width: '100%', height: 300, marginBottom: 10}}>
|
82
|
|
- <Image style={{flex: 1, resizeMode: "contain"}}
|
83
|
|
- source={{uri: this.displayData.logo}}/>
|
84
|
|
- </TouchableOpacity>
|
|
71
|
+ <View style={{marginLeft: 'auto', marginRight: 'auto'}}>
|
|
72
|
+ <ImageModal
|
|
73
|
+ resizeMode="contain"
|
|
74
|
+ imageBackgroundColor={this.colors.background}
|
|
75
|
+ style={{
|
|
76
|
+ width: 300,
|
|
77
|
+ height: 300,
|
|
78
|
+ }}
|
|
79
|
+ source={{
|
|
80
|
+ uri: this.displayData.logo,
|
|
81
|
+ }}
|
|
82
|
+ /></View>
|
85
|
83
|
: <View/>}
|
86
|
84
|
|
87
|
85
|
{this.displayData.description !== null ?
|
|
@@ -96,15 +94,6 @@ class ClubDisplayScreen extends React.Component<Props, State> {
|
96
|
94
|
</Card.Content>
|
97
|
95
|
: <View/>}
|
98
|
96
|
{this.getResponsiblesRender(this.displayData.responsibles)}
|
99
|
|
- <Portal>
|
100
|
|
- <ImageView
|
101
|
|
- images={[{uri: this.displayData.logo}]}
|
102
|
|
- imageIndex={0}
|
103
|
|
- presentationStyle={"fullScreen"}
|
104
|
|
- visible={this.state.imageModalVisible}
|
105
|
|
- onRequestClose={this.hideImageModal}
|
106
|
|
- />
|
107
|
|
- </Portal>
|
108
|
97
|
</ScrollView>
|
109
|
98
|
);
|
110
|
99
|
}
|