per page layout like this
Profile.getLayout = function getLayout(page) {
return <UserLayout>{page}</UserLayout>;
};
My _app.js looks like this:
const getLayout = Component.getLayout;
<Layout>
<ErrorBoundary FallbackComponent={ErrorFallback}>
{getLayout ? (
getLayout(<Component {...pageProps} />)
) : (
<Component {...pageProps} />
)}
</ErrorBoundary>
</Layout>
What is this Profile.getLayout Component.getLayout stuff. Use props.children to make a wrapper component
Обсуждают сегодня