forked from karthikvijay5227/Kshree
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetworkDown.js
More file actions
48 lines (45 loc) · 1.34 KB
/
NetworkDown.js
File metadata and controls
48 lines (45 loc) · 1.34 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
import React from 'react';
import { View, Text, StyleSheet, Image,TouchableOpacity } from 'react-native';
const NetworkDown = ({ onTryAgain }) => {
return (
<View style={styles.container}>
<Image source={require('./assets/nointernet.png')} style={styles.image} />
<Text style={styles.text}>Could not connect to network.Check your{' '}</Text>
<Text style={{ fontSize: 18, fontWeight: 'bold', textAlign: "center", color: "black" }}>internet connection.</Text>
<TouchableOpacity onPress={onTryAgain} style={styles.tryAgainButton}>
<Text style={styles.tryAgainButtonText}>Try Again</Text>
</TouchableOpacity>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
},
image: {
width: 150,
height: 150,
resizeMode: 'contain',
},
text: {
fontSize: 18,
fontWeight: 'bold',
padding: 20,
color: "black"
},
tryAgainButton: {
marginTop: 20,
padding: 10,
backgroundColor: '#007bff',
borderRadius: 5,
},
tryAgainButtonText: {
color: '#fff',
fontSize: 16,
fontWeight: 'bold',
},
});
export default NetworkDown;