Skip to content

Commit

Permalink
feat: use markdown parser to format metric description
Browse files Browse the repository at this point in the history
  • Loading branch information
aprat84 committed Jul 18, 2022
1 parent a90e225 commit e276cdd
Show file tree
Hide file tree
Showing 3 changed files with 536 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"react-csv": "^2.0.3",
"react-dom": "^17.0.1",
"react-i18next": "^11.7.3",
"react-markdown": "^8.0.3",
"react-scripts": "4.0.0",
"react-syntax-highlighter": "^15.4.3",
"web-vitals": "^0.2.4"
Expand Down
5 changes: 4 additions & 1 deletion src/components/Filters.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react'

import { makeStyles } from '@material-ui/core/styles'
import ReactMarkdown from 'react-markdown'
import { useTranslation } from 'react-i18next'

import Button from '@material-ui/core/Button'
Expand Down Expand Up @@ -146,7 +147,9 @@ const Filters = (props) => {
))
}
</Select>
<FormHelperText>{ selectedMetric?.description }</FormHelperText>
<FormHelperText component="div">
<ReactMarkdown>{ selectedMetric?.description }</ReactMarkdown>
</FormHelperText>
</FormControl>

{
Expand Down
Loading

0 comments on commit e276cdd

Please sign in to comment.