blazerapp/app/Home.js

78 lines
1.8 KiB
JavaScript
Raw Normal View History

2020-10-25 02:57:39 -04:00
import React, { useState } from 'react';
2020-08-09 17:01:25 -04:00
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
2020-10-25 02:57:39 -04:00
Modal,
TouchableHighlight,
Image,
2020-08-09 17:01:25 -04:00
} from 'react-native';
import {
Header,
LearnMoreLinks,
Colors,
DebugInstructions,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
2020-10-25 02:57:39 -04:00
import styles from './styles/morestyles'
2020-08-09 17:01:25 -04:00
2020-10-25 02:57:39 -04:00
function Home1() {
const [modalVisible, setModalVisible] = useState(true);
return (
<View>
<View>
<Modal animationType="slide" transparent={true} visible={modalVisible}>
<View style={styles.modal}>
<View style={{display: 'flex', flexDirection:'row', justifyContent: 'flex-end'}}>
<TouchableHighlight onPress={() => {setModalVisible(!modalVisible);}}>
<Image source = {require('./assets/exit.png')} style = {{height: 40, width: 40}}/>
</TouchableHighlight>
</View>
<View>
<Image source = {require('./assets/blair_logo.png')} style = {{alignSelf: 'center', marginTop: '5%', height: 325, width: 325}}/>
<Text style={styles.modalText}>hgjriwogjewope</Text>
</View>
</View>
</Modal>
</View>
<View>
</View>
</View>
)
}
2020-08-09 17:01:25 -04:00
class Home extends React.Component {
2020-10-25 02:57:39 -04:00
constructor(props) {
super(props)
this.state = {
data: [],
isLoading:true
}
}
/*componentDidMount() {
fetch(`${url}/api/en/popup`,{
headers: {
'Cache-Control': 'no-cache'
}}
).then((response) => {
return response.text();
}).then((json) => {
this.setState({data: JSON.parse(json),isLoading:false});
}).catch((error) => console.error(error))
}*/
2020-08-09 17:01:25 -04:00
render() {
return (
2020-10-25 02:57:39 -04:00
<View>
<Home1></Home1>
</View>
2020-08-09 17:01:25 -04:00
)
}
}
export default Home;