Skip to content
Snippets Groups Projects
Commit e557c1bc authored by ghughes1066's avatar ghughes1066
Browse files

Add DOI img in pagination

parent d890de1b
No related branches found
No related tags found
2 merge requests!59Master,!58Esap gui zenodo ossr
...@@ -8,6 +8,7 @@ import AddToBasket from "../../basket/AddToBasketCheckBox"; ...@@ -8,6 +8,7 @@ import AddToBasket from "../../basket/AddToBasketCheckBox";
export default function ZenodoResults({ catalog }) { export default function ZenodoResults({ catalog }) {
const context = useContext(QueryContext); const context = useContext(QueryContext);
const { queryMap, page, setPage } = context; const { queryMap, page, setPage } = context;
const regex = /(<([^>]+)>)/ig;
if (!context.queryMap) return null; if (!context.queryMap) return null;
...@@ -19,10 +20,10 @@ export default function ZenodoResults({ catalog }) { ...@@ -19,10 +20,10 @@ export default function ZenodoResults({ catalog }) {
<> <>
<br/> <br/>
<br/> <br/>
<h4><a href={hits.links.latest_html} target="_blank"> {hits.metadata.title.replaceAll("<p>","").replaceAll("</p>","")} </a></h4> <h4><a href={hits.links.latest_html} target="_blank"> {hits.metadata.title.replaceAll(regex, '')} </a></h4>
DOI: {hits.metadata.doi} <a href={hits.links.conceptdoi} target="_blank"> <img src={hits.links.badge} alt="DOI"/> </a>
<br/> <br/>
{hits.metadata.description.replaceAll("<p>","").replaceAll("</p>","").substring(0,200)}... {hits.metadata.description.replaceAll(regex, '').substring(0,200)}...
</> </>
)); ));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment