Похожие чаты

Nested layout is not working in next.js I m defining

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>

1 ответов

10 просмотров

What is this Profile.getLayout Component.getLayout stuff. Use props.children to make a wrapper component

Похожие вопросы

Карта сайта