From bb61c8f4bdd153c231c3648f5c731f7c13fd2261 Mon Sep 17 00:00:00 2001 From: jerem Date: Wed, 20 Nov 2024 15:12:20 +0100 Subject: [PATCH] feat(openalex): update RorBadge and RorName components for improved styling and structure --- .../openalex-ror/components/ror-badge.jsx | 4 +- .../openalex-ror/components/ror-badge_old.jsx | 47 +++++++------------ .../openalex-ror/components/ror-name.jsx | 19 ++++---- .../pages/openalex-ror/results/list-view.jsx | 12 ++--- client/src/styles/index.scss | 6 +++ 5 files changed, 39 insertions(+), 49 deletions(-) diff --git a/client/src/pages/openalex-ror/components/ror-badge.jsx b/client/src/pages/openalex-ror/components/ror-badge.jsx index f2ecafe..dd9e85a 100644 --- a/client/src/pages/openalex-ror/components/ror-badge.jsx +++ b/client/src/pages/openalex-ror/components/ror-badge.jsx @@ -21,14 +21,14 @@ export default function RorBadge({ {isRemoved ? ( https://ror.org/ - + {` ${ror.rorId}`} ) : ( <> https://ror.org/ - + {` ${ror.rorId}`} diff --git a/client/src/pages/openalex-ror/components/ror-badge_old.jsx b/client/src/pages/openalex-ror/components/ror-badge_old.jsx index a73dadd..a55d437 100644 --- a/client/src/pages/openalex-ror/components/ror-badge_old.jsx +++ b/client/src/pages/openalex-ror/components/ror-badge_old.jsx @@ -1,9 +1,7 @@ import { Link } from '@dataesr/dsfr-plus'; import PropTypes from 'prop-types'; -export default function RorBadge({ ror, setFilteredAffiliationName, rorColor }) { - console.log(rorColor, getComputedStyle(document.documentElement).getPropertyValue(`--${rorColor}`)); - +export default function RorBadge({ isRemoved, ror, setFilteredAffiliationName, rorColor }) { return (
@@ -15,40 +13,27 @@ export default function RorBadge({ ror, setFilteredAffiliationName, rorColor }) height="16" />
- https://ror.org/ - - {` ${ror.rorId}`} - + {isRemoved ? ( + + https://ror.org/ + + {` ${ror.rorId}`} + + + ) : ( + <> + https://ror.org/ + + {` ${ror.rorId}`} + + + )}