Unverified Commit e0ca6de8 authored by Sam Robbins's avatar Sam Robbins Committed by GitHub

Update layout-component example to use named functions (#27331)

## Documentation / Examples

- [x] Make sure the linting passes

In line with the PR #27297 which solved issue #27252, this updates the example to also use named functions in order to pass ESLint 
parent 41b4fc36
...@@ -32,9 +32,11 @@ export default function About() { ...@@ -32,9 +32,11 @@ export default function About() {
) )
} }
About.getLayout = (page) => ( About.getLayout = function getLayout(page) {
<Layout> return (
<Sidebar /> <Layout>
{page} <Sidebar />
</Layout> {page}
) </Layout>
)
}
...@@ -32,9 +32,11 @@ export default function Contact() { ...@@ -32,9 +32,11 @@ export default function Contact() {
) )
} }
Contact.getLayout = (page) => ( Contact.getLayout = function getLayout(page) {
<Layout> return (
<Sidebar /> <Layout>
{page} <Sidebar />
</Layout> {page}
) </Layout>
)
}
...@@ -32,9 +32,11 @@ export default function Index() { ...@@ -32,9 +32,11 @@ export default function Index() {
) )
} }
Index.getLayout = (page) => ( Index.getLayout = function getLayout(page) {
<Layout> return (
<Sidebar /> <Layout>
{page} <Sidebar />
</Layout> {page}
) </Layout>
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment