Modify theme support

4.x.x
megala21 7 years ago
parent 4df7431575
commit 6e1a48f084

@ -71,7 +71,6 @@ class Base extends Component {
if (this.state.user) { if (this.state.user) {
return ( return (
<div className="container"> <div className="container">
<MuiThemeProvider muiTheme={muiTheme}>
<BaseLayout> <BaseLayout>
<Switch> <Switch>
<Redirect exact path={"/"} to={"/assets/apps"}/> <Redirect exact path={"/"} to={"/assets/apps"}/>
@ -88,7 +87,6 @@ class Base extends Component {
<Route component={NotFound}/> <Route component={NotFound}/>
</Switch> </Switch>
</BaseLayout> </BaseLayout>
</MuiThemeProvider>
</div> </div>
) )
} }
@ -106,6 +104,7 @@ class Publisher extends Component {
render() { render() {
return ( return (
<div className="App"> <div className="App">
<MuiThemeProvider muiTheme={muiTheme}>
<Router basename="publisher" history={history}> <Router basename="publisher" history={history}>
<Switch> <Switch>
<Route path="/login" component={Login}/> <Route path="/login" component={Login}/>
@ -113,6 +112,7 @@ class Publisher extends Component {
<Route component={Base}/> <Route component={Base}/>
</Switch> </Switch>
</Router> </Router>
</MuiThemeProvider>
</div> </div>
); );
} }

@ -21,10 +21,9 @@ import React from 'react';
import Publisher from './App'; import Publisher from './App';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import registerServiceWorker from './registerServiceWorker'; import registerServiceWorker from './registerServiceWorker';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
/** /**
* This is the base js file of the app. All the content will be rendered in the root element. * This is the base js file of the app. All the content will be rendered in the root element.
* */ * */
ReactDOM.render(<MuiThemeProvider><Publisher/></MuiThemeProvider>, document.getElementById('root')); ReactDOM.render(<Publisher/>, document.getElementById('root'));
registerServiceWorker(); registerServiceWorker();

Loading…
Cancel
Save