refact: prefer function over lambdas

This commit is contained in:
Jean-Philippe Sirois
2019-07-27 17:54:51 -04:00
parent f7f66a3071
commit 90fb9b1888
13 changed files with 51 additions and 45 deletions
+9 -7
View File
@@ -3,12 +3,14 @@ import React from "react"
import Layout from "../components/Layout"
import SEO from "../components/SEO"
const NotFoundPage = () => (
<Layout>
<SEO title="404: Not found" />
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
</Layout>
)
function NotFoundPage() {
return (
<Layout>
<SEO title="404: Not found" />
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
</Layout>
)
}
export default NotFoundPage
+8 -6
View File
@@ -3,11 +3,13 @@ import React from "react"
import DocsLayout from "../components/DocsLayout"
import SEO from "../components/SEO"
const DocsPage = () => (
<DocsLayout>
<SEO title="Docs" />
the docs
</DocsLayout>
)
function DocsPage() {
return (
<DocsLayout>
<SEO title="Docs" />
the docs
</DocsLayout>
)
}
export default DocsPage
+12 -10
View File
@@ -4,15 +4,17 @@ import { Link } from "gatsby"
import Layout from "../components/Layout"
import SEO from "../components/SEO"
const IndexPage = () => (
<Layout>
<SEO title="Home" />
<h1>Hi people</h1>
<p>Welcome to your new Gatsby site.</p>
<p>Now go build something great.</p>
<div style={{ maxWidth: `300px`, marginBottom: `1.45rem` }}></div>
<Link to="/page-2/">Go to page 2</Link>
</Layout>
)
function IndexPage() {
return (
<Layout>
<SEO title="Home" />
<h1>Hi people</h1>
<p>Welcome to your new Gatsby site.</p>
<p>Now go build something great.</p>
<div style={{ maxWidth: `300px`, marginBottom: `1.45rem` }}></div>
<Link to="/page-2/">Go to page 2</Link>
</Layout>
)
}
export default IndexPage