// Libraries import React, { Component } from 'react'; // Components import PageLoader from '../PageLoader/PageLoader'; interface Props { isLoading?: boolean; children: JSX.Element[] | JSX.Element; } class PageContents extends Component { render() { const { isLoading } = this.props; return (
{isLoading && } {this.props.children}
); } } export default PageContents;