Skip to content

Instantly share code, notes, and snippets.

@mbensch
Created March 21, 2016 01:38
Show Gist options
  • Save mbensch/2280903169ff58bb0d6a to your computer and use it in GitHub Desktop.
Save mbensch/2280903169ff58bb0d6a to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import { BasePageContainer } from 'components';
class LandingPage extends Component {
constructor(props) {
super(props);
this.state = { containerHeight: window.innerHeight };
this.handleResize = this.handleResize.bind(this);
}
componentDidMount() {
window.addEventListener('resize', this.handleResize);
}
componentWillUnmount() {
window.removeEventListener('resize', this.handleResize);
}
handleResize() {
this.setState({ containerHeight: window.innerHeight });
}
render() {
return (
<BasePageContainer
classNames={['login-container', 'bg-vs-gradient']}
height={this.state.containerHeight}
>
<h1>Landing Page</h1>
</BasePageContainer>
);
}
}
export default LandingPage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment