computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
812 B
30 lines
812 B
import React from 'react'; |
|
import classNames from 'classnames'; |
|
import './global.scss'; |
|
import { firePageView } from 'lib/gtag'; |
|
import { SponsorBanner } from '../../components/sponsor-banner'; |
|
|
|
class DefaultLayout extends React.Component { |
|
state = { |
|
isBannerClosed: false |
|
}; |
|
|
|
componentDidMount() { |
|
firePageView(window.location.pathname); |
|
} |
|
|
|
render() { |
|
return ( |
|
<div> |
|
<div className={ classNames('banner-wrap', { 'd-none': this.state.isBannerClosed }) }> |
|
<SponsorBanner onCloseBanner={() => this.setState({ isBannerClosed: true })} /> |
|
</div> |
|
<div className={ classNames('body-wrap', { 'sponsor-banner-visible': !this.state.isBannerClosed }) }> |
|
{ this.props.children } |
|
</div> |
|
</div> |
|
); |
|
} |
|
} |
|
|
|
export default DefaultLayout;
|
|
|