diff options
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/SimpleContainer.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/SimpleContainer.tsx | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx b/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx index 4e5e35b7cce..8c2efc977af 100644 --- a/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx @@ -27,35 +27,19 @@ interface Props { hideLoggedInInfo?: boolean; } -export default class SimpleContainer extends React.PureComponent<Props> { - componentDidMount() { - const html = document.querySelector('html'); - if (html) { - html.classList.add('dashboard-page'); - } - } +export default function SimpleContainer(props: Props) { + return ( + <div className="global-container"> + <div className="page-wrapper" id="container"> + <NavBar className="navbar-global" height={theme.globalNavHeightRaw} /> - componentWillUnmount() { - const html = document.querySelector('html'); - if (html) { - html.classList.remove('dashboard-page'); - } - } - - render() { - return ( - <div className="global-container"> - <div className="page-wrapper" id="container"> - <NavBar className="navbar-global" height={theme.globalNavHeightRaw} /> - - <div id="bd" className="page-wrapper-simple"> - <div id="nonav" className="page-simple"> - {this.props.children} - </div> + <div id="bd" className="page-wrapper-simple"> + <div id="nonav" className="page-simple"> + {props.children} </div> </div> - <GlobalFooterContainer hideLoggedInInfo={this.props.hideLoggedInInfo} /> </div> - ); - } + <GlobalFooterContainer hideLoggedInInfo={props.hideLoggedInInfo} /> + </div> + ); } |