From 9ecd43d0e31c11baad32b5b656f028a9f0761beb Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 22 Jun 2018 19:37:14 +0200 Subject: [PATCH] revert refactoring, gatsby doesn't like splitting up StaticQuery --- src/components/molecules/Availability.jsx | 34 ++++++--------- src/components/molecules/ProjectNav.jsx | 50 +++++++++-------------- 2 files changed, 32 insertions(+), 52 deletions(-) diff --git a/src/components/molecules/Availability.jsx b/src/components/molecules/Availability.jsx index aeb5639..d5f3e75 100644 --- a/src/components/molecules/Availability.jsx +++ b/src/components/molecules/Availability.jsx @@ -4,23 +4,6 @@ import { StaticQuery, graphql } from 'gatsby' import { MoveIn } from '../atoms/Animations' import styles from './Availability.module.scss' -const AvailabilityElementQuery = ({ render }) => ( - -) - class Availability extends PureComponent { constructor(props) { super(props) @@ -28,7 +11,18 @@ class Availability extends PureComponent { render() { return ( - { const { availability } = data.dataYaml const { status, available, unavailable } = availability @@ -64,8 +58,4 @@ Availability.propTypes = { hide: PropTypes.bool } -AvailabilityElementQuery.propTypes = { - render: PropTypes.func -} - export default Availability diff --git a/src/components/molecules/ProjectNav.jsx b/src/components/molecules/ProjectNav.jsx index 808152c..7a0149e 100644 --- a/src/components/molecules/ProjectNav.jsx +++ b/src/components/molecules/ProjectNav.jsx @@ -15,31 +15,6 @@ const ProjectLink = ({ node }) => ( ) -const ProjectNavQuery = ({ render }) => ( - -) - class ProjectNav extends Component { constructor(props) { super(props) @@ -68,7 +43,26 @@ class ProjectNav extends Component { const { slug } = this.props return ( - { const projects = data.allProjectsYaml.edges @@ -110,8 +104,4 @@ ProjectNav.propTypes = { slug: PropTypes.string } -ProjectNavQuery.propTypes = { - render: PropTypes.func -} - export default ProjectNav