Created
July 1, 2021 21:05
-
-
Save rileybathurst/51cdf936bbaf6239c5f6436dc99d6b82 to your computer and use it in GitHub Desktop.
reactmarkdown children
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { graphql } from "gatsby"; | |
import ReactMarkdown from "react-markdown"; | |
const IndexPage = ({ data }) => { | |
return ( | |
<> | |
<ReactMarkdown children={service.markdown} /> | |
</> | |
); | |
}; | |
export default IndexPage; | |
export const pageQuery = graphql` | |
query MyQuery { | |
allStrapiService { | |
edges { | |
node { | |
markdown | |
} | |
} | |
} | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment