diff --git a/gatsby-browser.js b/gatsby-browser.js
index 6a236cb06c..d4a15ec249 100644
--- a/gatsby-browser.js
+++ b/gatsby-browser.js
@@ -1,53 +1,57 @@
-import React from "react"
-import { location, globalHistory } from "@reach/router"
+import React from 'react';
+import { location, globalHistory } from '@reach/router';
// Import PDS Global wrapper for applying global context providers.
-import { GlobalWrapper } from "@pantheon-systems/pds-toolkit-react"
-import { MOBILE_MENU_BREAKPOINT } from './src/vars/responsive'
+import { GlobalWrapper } from '@pantheon-systems/pds-toolkit-react';
+import { MOBILE_MENU_BREAKPOINT } from './src/vars/responsive';
// Import PDS core styles.
-import "./node_modules/@pantheon-systems/pds-toolkit-react/_dist/css/pds-core.css"
-import "./node_modules/@pantheon-systems/pds-toolkit-react/_dist/css/pds-layouts.css"
-import "./node_modules/@pantheon-systems/pds-toolkit-react/_dist/css/pds-components.css"
+import './node_modules/@pantheon-systems/pds-toolkit-react/_dist/css/pds-core.css';
+import './node_modules/@pantheon-systems/pds-toolkit-react/_dist/css/pds-layouts.css';
+import './node_modules/@pantheon-systems/pds-toolkit-react/_dist/css/pds-components.css';
// Global styles
-import "./src/styles/main.css"
-import "./src/styles/custom-glyphicons.css"
-import "./src/styles/pds-additions.css"
+import './src/styles/main.css';
+import './src/styles/custom-glyphicons.css';
+import './src/styles/pds-additions.css';
// custom typefaces
-import "prismjs/themes/prism-okaidia.css"
+import 'prismjs/themes/prism-okaidia.css';
// Code block line numbering
-import "prismjs/plugins/line-numbers/prism-line-numbers.css"
+import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
// Code block shell prompt
-import "./src/styles/codeBlocks.css"
+import './src/styles/codeBlocks.css';
// TOC generator
-import "tocbot/dist/tocbot.css"
-import "tocbot/dist/tocbot.min.js"
+import 'tocbot/dist/tocbot.css';
+import 'tocbot/dist/tocbot.min.js';
//Segment
export const onRouteUpdate = () => {
- window.locations = window.locations || [document.referrer]
- locations.push(window.location.href)
- window.previousPath = locations[locations.length - 2]
+ window.locations = window.locations || [document.referrer];
+ locations.push(window.location.href);
+ window.previousPath = locations[locations.length - 2];
window.analytics &&
window.analytics.page({
url: window.location.href,
referrer: window.previousPath,
title: document.title,
- })
+ });
//console.log("Title: ", document.title) //For debugging
-}
+};
// Trigger resize event once rendered.
export const onInitialClientRender = () => {
- window.dispatchEvent(new Event("resize"))
-}
+ window.dispatchEvent(new Event('resize'));
+};
// Global context providers.
export const wrapRootElement = ({ element }) => {
- return {element}
-}
+ return (
+
+ {element}
+
+ );
+};