import React from 'react'; import MovieSettings from './MovieSettings'; import GeneralSettings from './GeneralSettings'; import style from './SettingsPage.module.css'; import GlobalInfos from '../../GlobalInfos'; /** * The Settingspage handles all kinds of settings for the mediacenter * and is basically a wrapper for child-tabs */ class SettingsPage extends React.Component { constructor(props, context) { super(props, context); this.state = { currentpage: 'general' }; } /** * load the selected tab * @returns {JSX.Element|string} the jsx element of the selected tab */ getContent() { switch (this.state.currentpage) { case 'general': return ; case 'movies': return ; case 'tv': return ; // todo this page default: return 'unknown button clicked'; } } render() { const themestyle = GlobalInfos.getThemeStyle(); return (
Settings
this.setState({currentpage: 'general'})} className={style.SettingSidebarElement}>General
this.setState({currentpage: 'movies'})} className={style.SettingSidebarElement}>Movies
this.setState({currentpage: 'tv'})} className={style.SettingSidebarElement}>TV Shows
{this.getContent()}
); } } export default SettingsPage;