You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import React, {Component} from "react";
|
|
|
|
import {Button, Container, Content, H3, Header, Icon, Left, Right, Text, Title} from "native-base";
|
|
|
|
import {StatusBar, StyleSheet} from 'react-native';
|
|
|
|
import DefaultHeader from '../components/DefaultHeader';
|
|
|
|
import ReplacementLessonsApi from '../api/ReplacementLessonsApi'
|
|
|
|
import ApiClient from '../ApiClient'
|
|
|
|
|
|
|
|
class Home extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props)
|
|
|
|
this.state = {homeText: "Welcome! Loading content now!"}
|
|
|
|
api = new ApiClient("");
|
|
|
|
repl = new ReplacementLessonsApi(api);
|
|
|
|
repl
|
|
|
|
repl.findReplacementLessons((sx, lessons, s) => {
|
|
|
|
this.setState({homeText: sx.toString()})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Container>
|
|
|
|
<DefaultHeader title="Home" navigation={this.props.navigation}/>
|
|
|
|
|
|
|
|
<Content padder>
|
|
|
|
<Text>
|
|
|
|
{this.state.homeText}
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
</Content>
|
|
|
|
</Container>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default Home;
|