next-superjson icon indicating copy to clipboard operation
next-superjson copied to clipboard

`getLayout` does not work with `getStaticProps`

Open sanny-io opened this issue 2 years ago • 3 comments

When following this guide and specifying a getStaticProps function in my page that uses a layout, the page is rendered, but is not wrapped in the layout.

After removing the getStaticProps function or after removing withSuperjson from my Next.js configuration, the issue goes away, and both the page and layout are rendered.

I'm using Next.js 12.1.4 and next-superjson 0.0.2

sanny-io avatar Apr 11 '22 18:04 sanny-io

I can confirm the exact same issue

Haberkamp avatar Aug 05 '22 13:08 Haberkamp

can confirm. It also causes a full reload.

merthanmerter avatar Aug 27 '22 06:08 merthanmerter

https://github.com/blitz-js/next-superjson-plugin/issues/18

merthanmerter avatar Aug 31 '22 02:08 merthanmerter