Browse Source

fix: componentPage

pull/20281/head
ycjcl868 5 years ago
parent
commit
b241e9d6be
  1. 11
      site/theme/template/Content/MainContent.jsx

11
site/theme/template/Content/MainContent.jsx

@ -298,6 +298,7 @@ class MainContent extends Component {
{menuItems} {menuItems}
</Menu> </Menu>
); );
const componentPage = /^\/?components/.test(this.props.location.pathname);
return ( return (
<div className="main-wrapper"> <div className="main-wrapper">
@ -321,11 +322,13 @@ class MainContent extends Component {
<Article {...this.props} content={localizedPageData} /> <Article {...this.props} content={localizedPageData} />
)} )}
</section> </section>
<div className="fixed-widgets"> {componentPage && (
<div> <div className="fixed-widgets">
<Button onClick={this.changeTheme}>{theme}</Button> <div>
<Button onClick={this.changeTheme}>{theme}</Button>
</div>
</div> </div>
</div> )}
<PrevAndNext prev={prev} next={next} /> <PrevAndNext prev={prev} next={next} />
<Footer /> <Footer />
</Col> </Col>

Loading…
Cancel
Save