OpenMediaCenter/src/MainBody.js

25 lines
608 B
JavaScript
Raw Normal View History

2020-05-31 13:47:57 +02:00
import React from "react";
2020-05-31 20:24:35 +02:00
import HomePage from "./HomePage";
2020-05-31 13:47:57 +02:00
class MainBody extends React.Component {
2020-05-31 20:24:35 +02:00
constructor(props) {
super(props);
this.props = props;
}
2020-05-31 13:47:57 +02:00
render() {
2020-05-31 20:24:35 +02:00
let page;
if (this.props.page === "default") {
page = <HomePage viewbinding={this.props.viewbinding}/>;
} else if (this.props.page === "video") {
// show videoelement if neccessary
page = this.props.videoelement;
} else {
2020-05-31 20:24:35 +02:00
page = <div>unimplemented yet!</div>;
}
return (page);
2020-05-31 13:47:57 +02:00
}
}
2020-05-31 20:24:35 +02:00
export default MainBody;