Skip to content

Commit a0d725c

Browse files
committedOct 12, 2020
fix non object style in ecologi banner, remove need for company id, now -> vercel
1 parent 7943bd8 commit a0d725c

File tree

7 files changed

+37
-45
lines changed

7 files changed

+37
-45
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
22
.cache/
33
public/
4-
.env*
4+
.env*
5+
.vercel

‎gatsby-node.js

-18
This file was deleted.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"scripts": {
2222
"build": "gatsby build",
23-
"now-build": "npm run build",
23+
"vercel-build": "npm run build",
2424
"develop": "gatsby develop",
2525
"start": "npm run develop",
2626
"test": "echo \"Error: no test specified\" && exit 1"

‎src/components/footer.js

+24-14
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,30 @@ import styled from "styled-components";
33

44
const Footer = ({ name, address, companyNumber }) => (
55
<>
6-
<Row>
7-
<a href="https://ecologi.com/diff" target="_blank" rel="noopener noreferrer" title="View our Ecologi profile" style="width:200px;display:inline-block;">
8-
<img alt="We offset our carbon footprint via Ecologi" src="https://api.ecologi.com/badges/cpw/5e3fed1c59ec630016e27dd7?black=true&landscape=true" style="width:200px;" />
9-
</a>
10-
</Row>
11-
<Row>
12-
<footer>
13-
{name} <Em>|</Em>{" "}
14-
{Object.values(address || {})
15-
.filter(Boolean)
16-
.join(", ")}{" "}
17-
<Em>|</Em> #{companyNumber}
18-
</footer>
19-
</Row>
6+
<Row>
7+
<a
8+
href="https://ecologi.com/diff"
9+
target="_blank"
10+
rel="noopener noreferrer"
11+
title="View our Ecologi profile"
12+
style={{ width: "200px", display: "inline-block" }}
13+
>
14+
<img
15+
alt="We offset our carbon footprint via Ecologi"
16+
src="https://api.ecologi.com/badges/cpw/5e3fed1c59ec630016e27dd7?black=true&landscape=true"
17+
style={{ width: "200px" }}
18+
/>
19+
</a>
20+
</Row>
21+
<Row>
22+
<footer>
23+
{name} <Em>|</Em>{" "}
24+
{Object.values(address || {})
25+
.filter(Boolean)
26+
.join(", ")}{" "}
27+
<Em>|</Em> #{companyNumber}
28+
</footer>
29+
</Row>
2030
</>
2131
);
2232

‎src/pages/404.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const NotFoundPage = ({
1111
description: { description },
1212
twitterHandle,
1313
address,
14-
companyNumber
15-
}
16-
}
14+
companyNumber,
15+
},
16+
},
1717
}) => (
1818
<Layout {...{ address, companyNumber }}>
1919
<SEO title="404: Not found" {...{ name, description, twitterHandle }} />
@@ -26,8 +26,8 @@ const NotFoundPage = ({
2626
);
2727

2828
export const pageQuery = graphql`
29-
query FourOhFourQuery($contentfulCompanyId: String!) {
30-
contentfulCompany(id: { eq: $contentfulCompanyId }) {
29+
query FourOhFourQuery {
30+
contentfulCompany(name: { regex: "/diff/i" }) {
3131
address {
3232
line1
3333
city

‎src/pages/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const IndexPage = ({
1515
description: { description },
1616
twitterHandle,
1717
address,
18-
companyNumber
19-
}
20-
}
18+
companyNumber,
19+
},
20+
},
2121
}) => {
2222
return (
2323
<Layout {...{ name, address, companyNumber }}>
@@ -39,8 +39,8 @@ const IndexPage = ({
3939
};
4040

4141
export const pageQuery = graphql`
42-
query IndexQuery($contentfulCompanyId: String!) {
43-
contentfulCompany(id: { eq: $contentfulCompanyId }) {
42+
query IndexQuery {
43+
contentfulCompany(name: { regex: "/diff/i" }) {
4444
type
4545
byline
4646
contactEmail

‎now.json ‎vercel.json

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"build": {
1616
"env": {
1717
"CONTENTFUL_ACCESS_TOKEN": "@contentful-access-token",
18-
"CONTENTFUL_COMPANY_ID": "@contentful-company-id",
1918
"CONTENTFUL_HOST": "@contentful-host",
2019
"CONTENTFUL_SPACE_ID": "@contentful-space-id"
2120
}

0 commit comments

Comments
 (0)
Please sign in to comment.