diff --git a/pages/_document.js b/pages/_document.js index 8bfdff6..9e973c3 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -4,7 +4,7 @@ import { ServerStyleSheet } from "styled-components"; export default class MyDocument extends Document { static getInitialProps({ renderPage }) { const sheet = new ServerStyleSheet(); - const page = renderPage(App => props => + const page = renderPage((App) => (props) => sheet.collectStyles() ); const styleTags = sheet.getStyleElement(); @@ -15,6 +15,17 @@ export default class MyDocument extends Document { return ( + { + + } Shane Loeffler {this.props.styleTags} diff --git a/pages/index.js b/pages/index.js index 655cee0..fe01e6f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -2,6 +2,9 @@ import * as React from "react"; import Layout from "../components/Layout"; import Highlight from "../components/Highlight"; +if (process.browser) { + document.body.classList.add("loaded"); +} const projects = [ { img: "../static/img/maptheblacksnake.png",