Skip to content

Commit 6d25390

Browse files
authored
Fix layout example building (vercel#8326)
1 parent 869bf0f commit 6d25390

File tree

1 file changed

+8
-6
lines changed
  • examples/with-dynamic-app-layout/pages

1 file changed

+8
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import React from 'react'
2-
import App, { Container } from 'next/app'
2+
import App from 'next/app'
3+
4+
const Noop = ({ children }) => children
35

46
export default class MyApp extends App {
57
render () {
68
const { Component, pageProps } = this.props
9+
const Layout = Component.Layout || Noop
10+
711
return (
8-
<Container>
9-
<Component.Layout>
10-
<Component {...pageProps} />
11-
</Component.Layout>
12-
</Container>
12+
<Layout>
13+
<Component {...pageProps} />
14+
</Layout>
1315
)
1416
}
1517
}

0 commit comments

Comments
 (0)