/** * Copyright (c) 2013-present, Facebook, Inc. * * @emails react-core * @flow */ import patchDOMForGoogleTranslate from 'utils/patchDOMForGoogleTranslate'; import React, {Component} from 'react'; import Flex from 'components/Flex'; import Footer from 'components/LayoutFooter'; import Header from 'components/LayoutHeader'; import {media} from 'theme'; patchDOMForGoogleTranslate(); type Props = { children: Function, location: Location, }; class Template extends Component { render() { const {children, location} = this.props; // TODO - is there a better way to check if we need we have a sidebar? let layoutHasSidebar = false; if ( location.pathname.match( /^\/(docs|tutorial|community|blog|contributing|warnings)/, ) ) { layoutHasSidebar = true; } return (
{children}
); } } export default Template;