import React , { ComponentType } from "react" ; import Layout from "../components/Layout/Layout" ; function withLayout < T > ( WrappedComponent ) { return function ComponentWithLayout ( props ) { return ( < Layout > < WrappedComponent { ... props } / > < /Layout>); } ; } export default withLayout ;