Skip to content

Commit 7f41a96

Browse files
authored
fix(create-client): add Layout to Next.js (#1605)
1 parent 812a455 commit 7f41a96

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

create-client/nextjs.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,23 @@ You can also use an OpenAPI documentation with `-f openapi3`.
6262

6363
The code has been generated, and is ready to be executed!
6464

65+
Add the layout to the app:
66+
67+
```typescript
68+
import type { AppProps } from "next/app";
69+
import type { DehydratedState } from "react-query";
70+
71+
import Layout from "../components/common/Layout";
72+
73+
const App = ({ Component, pageProps }: AppProps<{dehydratedState: DehydratedState}>) => (
74+
<Layout dehydratedState={pageProps.dehydratedState}>
75+
<Component {...pageProps} />
76+
</Layout>
77+
);
78+
79+
export default App;
80+
```
81+
6582
## Starting the Project
6683

6784
You can launch the server with

0 commit comments

Comments
 (0)