Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Update layout-component example to use named functions (vercel#27331)
Browse files Browse the repository at this point in the history
## Documentation / Examples

- [x] Make sure the linting passes

In line with the PR vercel#27297 which solved issue vercel#27252, this updates the example to also use named functions in order to pass ESLint
  • Loading branch information
samrobbins85 authored Jul 20, 2021
1 parent a590a3b commit 38e85b4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
14 changes: 8 additions & 6 deletions examples/layout-component/pages/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ export default function About() {
)
}

About.getLayout = (page) => (
<Layout>
<Sidebar />
{page}
</Layout>
)
About.getLayout = function getLayout(page) {
return (
<Layout>
<Sidebar />
{page}
</Layout>
)
}
14 changes: 8 additions & 6 deletions examples/layout-component/pages/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ export default function Contact() {
)
}

Contact.getLayout = (page) => (
<Layout>
<Sidebar />
{page}
</Layout>
)
Contact.getLayout = function getLayout(page) {
return (
<Layout>
<Sidebar />
{page}
</Layout>
)
}
14 changes: 8 additions & 6 deletions examples/layout-component/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ export default function Index() {
)
}

Index.getLayout = (page) => (
<Layout>
<Sidebar />
{page}
</Layout>
)
Index.getLayout = function getLayout(page) {
return (
<Layout>
<Sidebar />
{page}
</Layout>
)
}

0 comments on commit 38e85b4

Please sign in to comment.