diff --git a/jest/__fixtures__/meta.json b/jest/__fixtures__/meta.json index 1ad3618..c4704af 100644 --- a/jest/__fixtures__/meta.json +++ b/jest/__fixtures__/meta.json @@ -9,6 +9,9 @@ "childImageSharp": { "fluid": { "src": "/static/b45f45aa8d98d4e4019a242d38f2f248/bc3a8/avatar.jpg" + }, + "resize": { + "src": "/static/b45f45aa8d98d4e4019a242d38f2f248/bc3a8/avatar.jpg" } } }, diff --git a/package.json b/package.json index 4700725..44e8ef0 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "format": "prettier --write 'src/**/*.{js,jsx}'", "format:css": "prettier-stylelint --write --quiet 'src/**/*.{css,scss}'", "test": "npm run lint && jest --coverage", + "test:watch": "npm run lint && jest --coverage --watch", "deploy": "./scripts/deploy.sh", "new": "babel-node ./scripts/new.js" }, diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 999de04..837bd65 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -25,59 +25,62 @@ const query = graphql` } ` -const LayoutMarkup = ({ children, isHomepage, allowedHosts, location }) => ( - <> - - +const LayoutMarkup = ({ children, data, location }) => { + const { allowedHosts } = data.contentYaml + const isHomepage = location.pathname === '/' - - -
-
{children}
- - + return ( + <> + + -