[ae07c5]: / src / screens / HomeScreen.js

Download this file

143 lines (133 with data), 3.9 kB

  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
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* eslint-disable prettier/prettier */
import React from 'react';
import {
Text,
View,
StyleSheet,
TouchableOpacity,
Image,
ScrollView,
} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
const HomeScreen = ({navigation}) => {
return (
<LinearGradient colors={['#26D0CE', '#1A2980']} style={styles.container}>
<ScrollView style={styles.scrollView}>
<Image
resizeMode="contain"
source={require('../images/lung_cancer.png')}
style={styles.bannerImage}
/>
<Text style={styles.bodyTitle}>What is Lung Cancer?</Text>
<Text style={styles.bodyText}>
Lung cancer is cancer that forms in tissues of the lung, usually in the cells that line the air passages. It is the leading cause of cancer death in both men and women. There are two main types: small cell lung cancer and non-small cell lung cancer. These two types grow differently and are treated differently.
</Text>
<TouchableOpacity
style={styles.btnView}
onPress={() => navigation.navigate('Predict')}>
<Text style={styles.btnText}>Predict Lung Cancer</Text>
</TouchableOpacity>
<View style={styles.cardView}>
<Image
resizeMode="contain"
source={require('../images/predict.png')}
style={styles.cardImage}
/>
<Text style={styles.bodyTitle}>
What is prediction and how is it achieved?
</Text>
<Text style={styles.bodyText}>
Prediction refers to the output of an algorithm after it has been
trained on a historical dataset and applied to new data when
forecasting the likelihood of a particular outcome.
</Text>
</View>
<View style={styles.cardView}>
<Image
resizeMode="contain"
source={require('../images/group.png')}
style={styles.cardImage}
/>
<Text style={styles.bodyTitle}>Who is Predict for?</Text>
<Text style={styles.bodyText}>
Predict is for clinicians, patients and their families. Patients
should use it in consultation with a medical professional.
</Text>
</View>
<View style={styles.cardView}>
<Image
resizeMode="contain"
source={require('../images/lung_cancer.png')}
style={styles.cardImage}
/>
<Text style={styles.bodyTitle}>
Can a person have lung cancer and not know it?
</Text>
<Text style={styles.bodyText}>
Some people have lung cancer without realizing it.But they can predict lung cancer from this machine.
</Text>
</View>
</ScrollView>
</LinearGradient>
);
};
const styles = StyleSheet.create({
container: {
paddingHorizontal: 20,
flex: 1,
},
bodyTitle: {
color: 'white',
fontSize: 20,
fontWeight: 'bold',
marginTop: 20,
alignSelf: 'center',
textAlign: 'center',
},
bodyText: {
color: 'white',
fontSize: 18,
marginTop: 20,
alignSelf: 'center',
textAlign: 'justify',
},
btnView: {
backgroundColor: '#1A2980',
height: 40,
width: '100%',
borderRadius: 5,
marginTop: 20,
justifyContent: 'center',
alignItems: 'center',
borderWidth: 1,
borderColor: 'white',
marginBottom: 20,
},
btnText: {
color: '#fff',
fontSize: 20,
fontWeight: 'bold',
},
bannerImage: {
width: '100%',
height: 250,
marginTop: 10,
},
cardView: {
// backgroundColor: '#070724',
padding: 10,
marginTop: 20,
borderRadius: 5,
borderWidth: 1,
borderColor: 'white',
// marginBottom: 100,
},
cardImage: {
width: '100%',
height: 200,
},
scrollView: {
flex: 1,
},
});
export default HomeScreen;