@@ -6,6 +6,8 @@ import ArticleIcon from "@mui/icons-material/Article";
66import { parseDate } from "../../utils/common" ;
77import { theme } from "../../theme" ;
88
9+ import parse from "html-react-parser" ;
10+
911export function SearchResult ( props ) {
1012
1113 const { data} = props ;
@@ -23,13 +25,13 @@ export function SearchResult(props) {
2325 {
2426 item . _index === "dataset" ?
2527 < MuiLink component = { Link } to = { `/datasets/${ item . _id } ` }
26- sx = { { fontWeight : 600 , fontSize : "18px" } } >
27- { item . name }
28+ sx = { { fontWeight : "bold" , fontSize : "18px" } } >
29+ { parse ( item . name ) }
2830 </ MuiLink >
2931 :
3032 < MuiLink component = { Link } to = { `/files/${ item . _id } ?dataset=${ item . dataset_id } ` }
31- sx = { { fontWeight : 600 , fontSize : "18px" } } >
32- { item . name }
33+ sx = { { fontWeight : "bold" , fontSize : "18px" } } >
34+ { parse ( item . name ) }
3335 </ MuiLink >
3436 }
3537 </ React . Fragment >
@@ -39,13 +41,13 @@ export function SearchResult(props) {
3941 < Typography variant = "body2" color = { theme . palette . secondary . light } >
4042 {
4143 item . _index === "dataset" ?
42- `Created by ${ item . author } at ${ parseDate ( item . created ) } `
44+ `Created by ${ parse ( item . author ) } at ${ parseDate ( item . created ) } `
4345 :
44- `Created by ${ item . creator } at ${ parseDate ( item . created ) } `
46+ `Created by ${ parse ( item . creator ) } at ${ parseDate ( item . created ) } `
4547 }
4648 </ Typography >
4749 < Typography variant = "body2" color = { theme . palette . secondary . dark } >
48- { item . _index === "dataset" ? item . description : `${ item . content_type } | ${ item . bytes } bytes` }
50+ { item . _index === "dataset" ? parse ( item . description ) : `${ item . content_type } | ${ item . bytes } bytes` }
4951 </ Typography >
5052 </ React . Fragment >
5153 }
0 commit comments