diff --git a/package.json b/package.json index afef077d2..570de2480 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "graphql": "0.6.0", "history": "3.0.0", "isomorphic-style-loader": "1.0.0", - "jade": "1.11.0", "jsonwebtoken": "7.0.0", "markdown-it": "6.0.5", "node-fetch": "1.5.3", @@ -75,7 +74,6 @@ "gaze": "^1.0.0", "git-repository": "^0.1.4", "glob": "^7.0.3", - "jade-loader": "^0.8.0", "json-loader": "^0.5.4", "mkdirp": "^0.5.1", "mocha": "^2.5.3", diff --git a/src/client.js b/src/client.js index 47346fac7..f91bea1f0 100644 --- a/src/client.js +++ b/src/client.js @@ -65,7 +65,9 @@ let renderComplete = (state, callback) => { // Google Analytics tracking. Don't send 'pageview' event after // the initial rendering, as it was already sent - window.ga('send', 'pageview'); + if (window.ga) { + window.ga('send', 'pageview'); + } callback(true); }; @@ -109,7 +111,7 @@ function run() { query: location.query, state: location.state, context, - render: render.bind(undefined, container, location.state), + render: render.bind(undefined, container, location.state), // eslint-disable-line react/jsx-no-bind, max-len }).catch(err => console.error(err)); // eslint-disable-line no-console } diff --git a/src/components/Html.js b/src/components/Html.js new file mode 100644 index 000000000..be22c96b1 --- /dev/null +++ b/src/components/Html.js @@ -0,0 +1,42 @@ +import React, { PropTypes } from 'react'; +import { analytics } from '../config'; + +function Html({ title, description, style, script, children }) { + return ( + + + + + {title} + + + +