Files
freeCodeCamp/packages/learn/src/templates/Introduction/SuperBlockIntro.js

47 lines
1.1 KiB
JavaScript
Raw Normal View History

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';
import FullWidthRow from '../../components/util/FullWidthRow';
import { MarkdownRemark } from '../../redux/propTypes';
const propTypes = {
data: PropTypes.shape({
markdownRemark: MarkdownRemark
})
};
function SuperBlockIntroductionPage({ data: { markdownRemark } }) {
const { html, frontmatter: { superBlock } } = markdownRemark;
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
}
}
`;