import React from 'react';
import MainBody from "./MainBody";
import 'bootstrap/dist/css/bootstrap.min.css';
class App extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {page: "default"};
// bind this to the method for being able to call methods such as this.setstate
this.showVideo = this.showVideo.bind(this);
this.hideVideo = this.hideVideo.bind(this);
}
render() {
return (
);
}
loadCategoriesPage() {
console.log("click categories");
this.setState({page: "categories"});
}
loadRandomPage() {
console.log("click random");
this.setState({page: "random"});
}
loadHomePage() {
console.log("click default");
this.setState({page: "default"});
}
showVideo(element) {
this.setState({
page: "video"
});
this.element = element;
}
hideVideo() {
this.setState({
page: "default"
});
this.element = null;
}
}
export default App;