Skip to content

Commit 949b257

Browse files
authored
Merge pull request #395 from CBIIT/dev-1.4.5
Participating resource page-> links in description (#394)
2 parents 14b2fbf + af2ad22 commit 949b257

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/pages/participatingResourcesPage/SearchResult/SearchResult.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useEffect } from 'react';
2+
import ReactHtmlParser from 'html-react-parser';
23
import styled from 'styled-components';
34
import PropTypes from 'prop-types';
45
import { Popover } from 'bootstrap';
@@ -58,12 +59,19 @@ const ResourceIcon = styled.div`
5859

5960
const ResourceDesc = styled.div`
6061
width: 100%;
61-
display: flex;
62+
// display: flex;
6263
margin-top: 15px;
6364
word-wrap: break-word;
6465
hyphens: auto;
6566
font-size: 0.9rem;
6667
font-weight: 500;
68+
69+
a {
70+
color: #00a272;
71+
background: url(${externalIcon}) right center no-repeat;
72+
padding-right: 30px;
73+
background-size: 32px;
74+
}
6775
`;
6876

6977
const ResourceContact = styled.div`
@@ -254,7 +262,7 @@ const SearchResult = ({
254262
</ResourceLogo>
255263
</ResourceHeader>
256264
<ResourceDesc>
257-
{rst.description}
265+
{rst.description && ReactHtmlParser(rst.description)}
258266
</ResourceDesc>
259267
<ResourceContact>
260268
<ContactInfo>

0 commit comments

Comments
 (0)