Roadmap to becoming a developer in 2022
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.

31 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;