import React, { PureComponent } from 'react';

export default function (WrappedComponent) {
    return class extends PureComponent {
        componentDidMount() {
            document.body.style.height = `100%`
            document.getElementById('root').style.height = `100%`
            document.documentElement.style.height = '100%'
        }
        componentWillUnmount() {
            document.body.style.height = `auto`
            document.getElementById('root').style.height = `auto`
            document.documentElement.style.height = 'auto'
        }

        render() {
            return (
                <WrappedComponent {...this.props}/>
            );
        }
    }
}

