-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathgatsby-browser.js
27 lines (22 loc) · 1.9 KB
/
gatsby-browser.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import "./src/styles/global.css";
import { pageView } from "./scripts/track";
export { default as wrapRootElement } from "./src/state/wrap-with-provider";
export const onClientEntry = () => {
console.log(`
██████╗ ██╗███╗ ██╗ ██████╗ ██████╗ █████╗ ██████╗ ██████╗ ██████╗ ██████╗███████╗
██╔══██╗██║████╗ ██║██╔════╝ ██╔════╝██╔══██╗██╔══██╗ ██╔══██╗██╔═══██╗██╔════╝██╔════╝
██████╔╝██║██╔██╗ ██║██║ ███╗██║ ███████║██████╔╝ ██║ ██║██║ ██║██║ ███████╗
██╔═══╝ ██║██║╚██╗██║██║ ██║██║ ██╔══██║██╔═══╝ ██║ ██║██║ ██║██║ ╚════██║
██║ ██║██║ ╚████║╚██████╔╝╚██████╗██║ ██║██║ ██████╔╝╚██████╔╝╚██████╗███████║
╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═════╝╚══════╝
=====================================
Project : pingcap/website-docs
Env : ${process.env.NODE_ENV}
=====================================
`);
};
export const onRouteUpdate = ({ location, prevLocation }) => {
if (process.env.NODE_ENV === "production") {
pageView();
}
};