forked from jk715/docs.hackerone.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
41 lines (36 loc) · 993 Bytes
/
Copy pathindex.js
File metadata and controls
41 lines (36 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from 'react'
import Link from 'gatsby-link'
import Article from '../../components/article/article'
import programsNav from './programs-nav.yaml'
class IndexRoute extends React.Component {
render() {
const { markdownRemark } = this.props.data
return (
<Article
links={programsNav}
path={markdownRemark.frontmatter.path}
docOnGithub={`${markdownRemark.frontmatter.id}.md`}
title={markdownRemark.frontmatter.title}
description={markdownRemark.frontmatter.description}
>
<h1>{markdownRemark.frontmatter.title}</h1>
<div dangerouslySetInnerHTML={{ __html: markdownRemark.html }} />
</Article>
)
}
}
export default IndexRoute
export const pageQuery = graphql`
query programsIndexQuery {
markdownRemark(frontmatter: { bookIndexFor: { eq: "programs" } }) {
html
frontmatter {
path
id
title
bookIndexFor
description
}
}
}
`