import * as React from 'react' ; import { withStyles } from 'material-ui/styles' ; import { Route , Switch , withRouter } from 'react-router-dom' ; import { HomePage } from './features' ; const styles = theme => ( { '@global' : { html : { height : '100%' , boxSizing : 'border-box' } , '*, *:before, *:after' : { boxSizing : 'inherit' } , body : { height : '100%' , margin : 0 , background : theme . palette . background . default , fontFamily : theme . typography . fontFamily , fontSize : theme . typography . fontSize , color : theme . palette . text . primary , WebkitFontSmoothing : 'antialiased' , MozOsxFontSmoothing : 'grayscale' , WebkitOverflowScrolling : 'touch' } , '#root' : { height : '100%' } } , root : { height : '100%' } } ) ; interface ShellProps { classes : any ; } class ShellBase extends React . Component < ShellProps , { } > { render ( ) { const { classes } = this . props ; return ( < div className = { classes . root } > < Switch > < Route exact = { true } path = "/" component = { HomePage } / > < /Switch> { } < /div>); } } export const Shell = withRouter ( withStyles ( styles ) ( ShellBase ) ) ;