-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
34 lines (25 loc) · 846 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
import { StatusBar } from 'expo-status-bar';
import React , {useState, useEffect }from 'react';
import { StyleSheet, Text, View, Dimensions } from 'react-native';
import DungeonsOfSpiritmount from './DungeonsOfSpiritmount';
export default function App() {
const [window, setWindow] = useState(Dimensions.get('screen'))
const windowHandler = () =>{
setWindow(Dimensions.get('screen'))
}
const windowListener = Dimensions.addEventListener("change", windowHandler)
return (
<View style={styles.container}>
<DungeonsOfSpiritmount width = {window.width} height ={window.height/2} window ={window} layout={[]}/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
},
});