Skip to content

Commit c8992bf

Browse files
committed
Remove mailchimp dep
1 parent eb47639 commit c8992bf

File tree

7 files changed

+21
-45
lines changed

7 files changed

+21
-45
lines changed

gatsby-node.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ exports.createPages = ({ actions, graphql }) => {
3737
}
3838
}
3939
}
40-
`).then(result => {
40+
`).then((result) => {
4141
if (result.errors) {
42-
result.errors.forEach(e => console.error(e.toString()));
42+
result.errors.forEach((e) => console.error(e.toString()));
4343
return Promise.reject(result.errors);
4444
}
4545

@@ -53,7 +53,7 @@ exports.createPages = ({ actions, graphql }) => {
5353
pathPrefix: "page", // This is optional and defaults to an empty string if not used
5454
buildPath: (index, pathPrefix) =>
5555
index > 1 ? `${pathPrefix}/${index}` : `/`, // This is optional and this is the default
56-
context: {} // This is optional and defaults to an empty object if not used
56+
context: {}, // This is optional and defaults to an empty object if not used
5757
});
5858

5959
posts.forEach((edge, index) => {
@@ -70,8 +70,8 @@ exports.createPages = ({ actions, graphql }) => {
7070
// additional data can be passed via context
7171
context: {
7272
id,
73-
next
74-
}
73+
next,
74+
},
7575
});
7676
});
7777
});
@@ -85,7 +85,7 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
8585
createNodeField({
8686
name: `slug`,
8787
node,
88-
value
88+
value,
8989
});
9090
}
9191
};

now.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/components/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Layout = ({ children }) => (
1515
}
1616
}
1717
`}
18-
render={data => (
18+
render={(data) => (
1919
<>
2020
<Helmet title="useHooks - Easy to understand React Hook recipes">
2121
<html lang="en" />

src/components/PostTemplate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
Info,
1010
Links,
1111
LinksLi,
12-
Name
12+
Name,
1313
} from "./styled";
1414

1515
const PostTemplate = ({ content, frontmatter, slug, permalink }) => {
@@ -21,7 +21,7 @@ const PostTemplate = ({ content, frontmatter, slug, permalink }) => {
2121
);
2222

2323
const handleSwitchCodeClick = useCallback(() => {
24-
setLang(value => (value === "jsx" ? "tsx" : "jsx"));
24+
setLang((value) => (value === "jsx" ? "tsx" : "jsx"));
2525
}, []);
2626

2727
return (
@@ -81,7 +81,7 @@ const PostTemplate = ({ content, frontmatter, slug, permalink }) => {
8181
-{" "}
8282
<span
8383
dangerouslySetInnerHTML={{
84-
__html: link.description
84+
__html: link.description,
8585
}}
8686
/>
8787
</LinksLi>

src/components/styled.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ export const Hook = styled.div`
55
`;
66

77
export const Composes = styled.div.attrs({
8-
className: "subtitle"
8+
className: "subtitle",
99
})`
1010
padding-top: 3px;
1111
font-size: 0.9rem !important;
1212
`;
1313

1414
export const Name = styled.h2.attrs({
15-
className: "title is-3"
15+
className: "title is-3",
1616
})`
1717
position: relative;
1818
@@ -61,7 +61,7 @@ export const LinksLi = styled.li`
6161
`;
6262

6363
export const Info = styled.div.attrs({
64-
className: "level"
64+
className: "level",
6565
})`
6666
margin: 20px auto 0 auto;
6767
max-width: 560px;

src/templates/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const IndexPage = ({ pageContext }) => {
3636
aria-label="pagination"
3737
style={{
3838
maxWidth: "600px",
39-
margin: "0 auto"
39+
margin: "0 auto",
4040
}}
4141
>
4242
<Link
@@ -46,7 +46,7 @@ const IndexPage = ({ pageContext }) => {
4646
style={{
4747
// Temp hack to prevent clicking
4848
// TODO: Render a link without a href instead
49-
pointerEvents: first ? "none" : "auto"
49+
pointerEvents: first ? "none" : "auto",
5050
}}
5151
>
5252
Previous
@@ -56,7 +56,7 @@ const IndexPage = ({ pageContext }) => {
5656
to={nextUrl}
5757
disabled={last}
5858
style={{
59-
pointerEvents: last ? "none" : "auto"
59+
pointerEvents: last ? "none" : "auto",
6060
}}
6161
>
6262
Next Page
@@ -97,7 +97,7 @@ function searchPosts(posts, search) {
9797
let titles = {};
9898

9999
// Get all posts that have a matching title
100-
const filterPostsByTitle = posts.filter(post => {
100+
const filterPostsByTitle = posts.filter((post) => {
101101
const hook = post.node.frontmatter;
102102
const titleLowerCase = hook.title.toLowerCase();
103103
const doesInclude = titleLowerCase.includes(search.toLowerCase());
@@ -110,7 +110,7 @@ function searchPosts(posts, search) {
110110
});
111111

112112
// Get all posts that have a matching description and DON'T match by title
113-
const filterPostsByDescription = posts.filter(post => {
113+
const filterPostsByDescription = posts.filter((post) => {
114114
const hook = post.node.frontmatter;
115115
const titleLowerCase = hook.title.toLowerCase();
116116
const description = post.node.html || "";

src/utils/analytics.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const analytics = Analytics({
55
debug: process.env.NODE_ENV !== "production",
66
plugins: [
77
googleAnalyticsPlugin({
8-
trackingId: "UA-195006-22"
9-
})
10-
]
8+
trackingId: "UA-195006-22",
9+
}),
10+
],
1111
});
1212

1313
export default analytics;

0 commit comments

Comments
 (0)