-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathResults.js
45 lines (40 loc) · 1.01 KB
/
Results.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react';
import { StyleSheet, Image, View, TouchableOpacity, Dimensions } from 'react-native';
import { MaterialCommunityIcons } from '@expo/vector-icons';
class Result extends React.PureComponent{
constructor(props){
super(props);
}
render() {
const { navigation } = this.props;
const photo = navigation.getParam('image', {});
return(
<View style={styles.buttonContainer}>
<Image
source={{uri: `data:image/jpeg;base64,${photo}`}}
style={{flex:1, width: Dimensions.get('window').width, height: Dimensions.get('window').width * 4 / 3}}
resizeMode="contain" />
</View>
)
}
}
export default Result
const styles = StyleSheet.create({
cameraIcon: {
display: "flex",
height: "100%",
alignItems: "center",
},
text: {
height: "auto",
display: "flex",
alignItems: "center",
},
buttonContainer: {
display: "flex",
height: "100%",
width: "100%",
alignItems: "center",
backgroundColor: "#000"
}
})