Open binalfew opened 2 years ago
const Layout = ({ children }) => { return ( <div> <main> {children} </main> </div> ); }; export default Layout;
Index.layout = (page: ReactElement) => ( <Layout> {page} </Layout> ) export default withApollo({ ssr: true })(Index)
If I have the following layout component:
Use the layout component in my pages (Index.tsx) before passing the page to the withApollo HOC