import React from 'react' import PropTypes from 'prop-types' import { Link, graphql } from 'gatsby' import classnames from 'classnames' import SEO from '../components/Seo' import Layout from '../components/Layout' import Content from '../components/Content' import HeaderHome from '../components/HeaderHome' import Repositories from '../components/Repositories' import { ReactComponent as Arrow } from '../images/arrow.svg' import styles from './index.module.scss' const SectionBox = ({ to, children, ...props }) => to ? ( {children} ) : (
{children}
) SectionBox.propTypes = { to: PropTypes.string.isRequired, children: PropTypes.any.isRequired } const SectionLink = ({ to, title, color, children }) => { // eslint-disable-next-line let classNames = classnames(styles.link, { [styles.purple]: color === 'purple', [styles.blue]: color === 'blue', [styles.orange]: color === 'orange', [styles.green]: color === 'green' }) return (

{title}

{children}

{title !== 'API References' && ( Learn More )}
) } SectionLink.propTypes = { to: PropTypes.string.isRequired, title: PropTypes.string.isRequired, color: PropTypes.string, children: PropTypes.any } const IndexPage = ({ data, location }) => ( <> }>
    {data.allSectionsYaml.edges.map(({ node }) => (
  • {node.description}
  • ))}
) IndexPage.propTypes = { data: PropTypes.object.isRequired, location: PropTypes.object.isRequired } export default IndexPage export const IndexQuery = graphql` query { site { siteMetadata { siteDescription } } allSectionsYaml { edges { node { title description link color } } } } `