-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
30 lines (28 loc) · 888 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
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { WebView } from 'react-native-webview';
import { SafeAreaProvider, SafeAreaInsetsContext } from 'react-native-safe-area-context';
export default function App() {
return (
<SafeAreaProvider>
<SafeAreaInsetsContext.Consumer>
{(insets) => (
<View style={[styles.container, {paddingTop: insets?.top || 0}]}>
<WebView style={styles.webview} source={{ uri: 'https://knuhackerton-web.vercel.app' }} />
</View>
)}
</SafeAreaInsetsContext.Consumer>
<StatusBar style="black" backgroundColor="#f8f8f8" />
</SafeAreaProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#ffffff',
},
webview: {
flex: 1,
}
});