import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { StaticQuery, graphql } from 'gatsby'; import { Grid, Col, Row } from '@freecodecamp/react-bootstrap'; import { NavigationContext } from '../../contexts/GuideNavigationContext'; import SideNav from './components/guide/SideNav'; import Spacer from '../helpers/Spacer'; import 'prismjs/themes/prism.css'; import './guide.css'; const propTypes = { children: PropTypes.any, data: PropTypes.shape({ allNavigationNode: PropTypes.shape({ edges: PropTypes.arrayOf( PropTypes.shape({ node: PropTypes.shape({ dashedName: PropTypes.string, isStubbed: PropTypes.bool, path: PropTypes.string, title: PropTypes.string }) }) ) }) }), location: PropTypes.object }; const Layout = ({ children }) => ( { const { edges } = data.allNavigationNode; const pages = edges.map(edge => edge.node); return ( {({ toggleDisplaySideNav, displaySideNav, expandedState, toggleExpandedState }) => (
{children}
)}
); }} /> ); Layout.displayName = 'Layout'; Layout.propTypes = propTypes; export default Layout;