Skip to content

Commit c8aa418

Browse files
committed
Update environment variable for facebook
1 parent c33771c commit c8aa418

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

gatsby-config.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// loading env
2-
const activeEnv = process.env.NODE_ENV || 'development'
3-
console.log(`Using environment config: '${activeEnv}'`)
4-
require("dotenv").config({
5-
path: `.env.${activeEnv}`,
6-
})
7-
81
let siteConfig;
92
let ghostConfig;
103

@@ -92,7 +85,7 @@ if (process.env.GATSBY_HOTJAR_ID) {
9285
resolve: `gatsby-plugin-hotjar`,
9386
options: {
9487
id: process.env.GATSBY_HOTJAR_ID,
95-
sv: process.env.GATSBY_HOTJAR_SV
88+
sv: 6
9689
}
9790
});
9891
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"react-dom": "^16.13.0"
2121
},
2222
"dependencies": {
23-
"@draftbox-co/gatsby-theme-ghost-attila": "^1.0.25",
23+
"@draftbox-co/gatsby-theme-ghost-attila": "^1.0.26",
2424
"dotenv": "^8.2.0",
2525
"gatsby": "2.20.24",
2626
"gatsby-plugin-crisp-chat": "^3.2.2",

src/@draftbox-co/gatsby-theme-ghost-attila/components/fb-comments.jsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import React from "react";
22
import { FacebookProvider, Comments } from 'react-facebook';
33

44
const FbComments = props => {
5-
console.log({ props });
6-
return process.env.FB_APP_ID ? (
7-
<FacebookProvider appId={process.env.FB_APP_ID}>
5+
return process.env.GATSBY_FB_APP_ID ? (
6+
<FacebookProvider appId={process.env.GATSBY_FB_APP_ID}>
87
<Comments width={"100%"} href={props.href}/>
98
</FacebookProvider>
109
) : (
1110
<></>
1211
);
13-
return ;
1412
};
1513

1614
export default FbComments;

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1054,10 +1054,10 @@
10541054
lodash "^4.17.13"
10551055
to-fast-properties "^2.0.0"
10561056

1057-
"@draftbox-co/gatsby-theme-ghost-attila@^1.0.25":
1058-
version "1.0.25"
1059-
resolved "https://registry.yarnpkg.com/@draftbox-co/gatsby-theme-ghost-attila/-/gatsby-theme-ghost-attila-1.0.25.tgz#39af045f6c3ad4ba55ae790917fa54a4c8e9869c"
1060-
integrity sha512-PC86rTsvX/jpSItcMDUmwr8ZSGZUfqc+qxM4nvjIA7iiNGcBBv4l50VfImqtT49I/VRbmdGWd1x7sSsae/UNMw==
1057+
"@draftbox-co/gatsby-theme-ghost-attila@^1.0.26":
1058+
version "1.0.26"
1059+
resolved "https://registry.yarnpkg.com/@draftbox-co/gatsby-theme-ghost-attila/-/gatsby-theme-ghost-attila-1.0.26.tgz#b44405a9112c62b61b01a74801e1b2c115b16199"
1060+
integrity sha512-nWilbCk5BnMs7US/5g8o0qFiRI9vX0IjiOP6vLtEtgozDaVvH/CcOruk+r0d9tgkL2mAX4ZtjLRTFkvyTSAnNg==
10611061
dependencies:
10621062
"@armada-inc/gatsby-plugin-amp" "^0.2.3"
10631063
"@tryghost/helpers" "^1.1.22"

0 commit comments

Comments
 (0)