2018-05-18 11:59:12 +01:00
|
|
|
import React, { Fragment } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Helmet from 'react-helmet';
|
2018-09-11 16:10:21 +03:00
|
|
|
import { graphql } from 'gatsby';
|
2018-05-18 11:59:12 +01:00
|
|
|
|
2018-09-30 11:37:19 +01:00
|
|
|
import FullWidthRow from '../../components/helpers/FullWidthRow';
|
2018-05-18 11:59:12 +01:00
|
|
|
import { MarkdownRemark } from '../../redux/propTypes';
|
|
|
|
|
|
|
|
const propTypes = {
|
|
|
|
data: PropTypes.shape({
|
|
|
|
markdownRemark: MarkdownRemark
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
2018-05-18 16:46:40 +01:00
|
|
|
function SuperBlockIntroductionPage({ data: { markdownRemark } }) {
|
2019-02-18 19:32:49 +00:00
|
|
|
const {
|
|
|
|
html,
|
|
|
|
frontmatter: { superBlock }
|
|
|
|
} = markdownRemark;
|
2018-05-18 11:59:12 +01:00
|
|
|
return (
|
|
|
|
<Fragment>
|
|
|
|
<Helmet>
|
|
|
|
<title>{superBlock} | freeCodeCamp</title>
|
|
|
|
</Helmet>
|
|
|
|
<FullWidthRow>
|
|
|
|
<div
|
|
|
|
className='intro-layout'
|
|
|
|
dangerouslySetInnerHTML={{ __html: html }}
|
|
|
|
/>
|
|
|
|
</FullWidthRow>
|
|
|
|
</Fragment>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
SuperBlockIntroductionPage.displayName = 'SuperBlockIntroductionPage';
|
|
|
|
SuperBlockIntroductionPage.propTypes = propTypes;
|
|
|
|
|
|
|
|
export default SuperBlockIntroductionPage;
|
|
|
|
|
|
|
|
export const query = graphql`
|
|
|
|
query SuperBlockIntroPageBySlug($slug: String!) {
|
|
|
|
markdownRemark(fields: { slug: { eq: $slug } }) {
|
|
|
|
frontmatter {
|
|
|
|
superBlock
|
|
|
|
}
|
|
|
|
html
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|