-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
36 lines (34 loc) · 921 Bytes
/
App.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
import * as React from 'react';
import { StyleSheet, SafeAreaView, StatusBar, Platform } from 'react-native';
import { WebView } from 'react-native-webview';
export default class App extends React.Component {
render() {
return (
<>
<StatusBar backgroundColor="#D2D2D2" barStyle="dark-content" />
{
Platform.OS === "web" ? (
<iframe src="https://gurdening.vercel.app" style={{ height: '100%', width: '100%' }} />
) : (
<SafeAreaView style={styles.safeArea}>
<WebView
source={{ uri: "https://gurdening.vercel.app" }}
style={styles.webView}
javaScriptEnabled={true}
/>
</SafeAreaView>
)
}
</>
);
}
}
const styles = StyleSheet.create({
safeArea: {
flex: 1,
backgroundColor: '#D2D2D2'
},
webView: {
flex: 1
},
});