fix: remove duplicate ontology mappings rendering in LinkML viewer
Some checks are pending
Deploy Frontend / build-and-deploy (push) Waiting to run
Some checks are pending
Deploy Frontend / build-and-deploy (push) Waiting to run
The slot details section was rendering close_mappings, narrow_mappings, broad_mappings, and related_mappings twice each. This caused the mappings to appear duplicated on pages like /linkml?class=AcademicArchive. Removed 68 lines of duplicate JSX code.
This commit is contained in:
parent
8a3c907f59
commit
3b676f3ea5
1 changed files with 0 additions and 68 deletions
|
|
@ -3054,74 +3054,6 @@ const LinkMLViewerPage: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{slot.close_mappings && slot.close_mappings.length > 0 && (
|
|
||||||
<div className="linkml-viewer__mappings">
|
|
||||||
<span className="linkml-viewer__label"><OverrideMarker property="close_mappings" />{t('closeMappings')}</span>
|
|
||||||
<div className="linkml-viewer__tag-list">
|
|
||||||
{slot.close_mappings.map(mapping => (
|
|
||||||
<button
|
|
||||||
key={mapping}
|
|
||||||
className="linkml-viewer__tag linkml-viewer__tag--mapping linkml-viewer__tag--close linkml-viewer__tag--clickable"
|
|
||||||
onClick={() => setOntologyPopupCurie(mapping)}
|
|
||||||
title={`View ontology term: ${mapping}`}
|
|
||||||
>
|
|
||||||
{mapping}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{slot.narrow_mappings && slot.narrow_mappings.length > 0 && (
|
|
||||||
<div className="linkml-viewer__mappings">
|
|
||||||
<span className="linkml-viewer__label"><OverrideMarker property="narrow_mappings" />{t('narrowMappings')}</span>
|
|
||||||
<div className="linkml-viewer__tag-list">
|
|
||||||
{slot.narrow_mappings.map(mapping => (
|
|
||||||
<button
|
|
||||||
key={mapping}
|
|
||||||
className="linkml-viewer__tag linkml-viewer__tag--mapping linkml-viewer__tag--narrow linkml-viewer__tag--clickable"
|
|
||||||
onClick={() => setOntologyPopupCurie(mapping)}
|
|
||||||
title={`View ontology term: ${mapping}`}
|
|
||||||
>
|
|
||||||
{mapping}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{slot.broad_mappings && slot.broad_mappings.length > 0 && (
|
|
||||||
<div className="linkml-viewer__mappings">
|
|
||||||
<span className="linkml-viewer__label"><OverrideMarker property="broad_mappings" />{t('broadMappings')}</span>
|
|
||||||
<div className="linkml-viewer__tag-list">
|
|
||||||
{slot.broad_mappings.map(mapping => (
|
|
||||||
<button
|
|
||||||
key={mapping}
|
|
||||||
className="linkml-viewer__tag linkml-viewer__tag--mapping linkml-viewer__tag--broad linkml-viewer__tag--clickable"
|
|
||||||
onClick={() => setOntologyPopupCurie(mapping)}
|
|
||||||
title={`View ontology term: ${mapping}`}
|
|
||||||
>
|
|
||||||
{mapping}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{slot.related_mappings && slot.related_mappings.length > 0 && (
|
|
||||||
<div className="linkml-viewer__mappings">
|
|
||||||
<span className="linkml-viewer__label"><OverrideMarker property="related_mappings" />{t('relatedMappings')}</span>
|
|
||||||
<div className="linkml-viewer__tag-list">
|
|
||||||
{slot.related_mappings.map(mapping => (
|
|
||||||
<button
|
|
||||||
key={mapping}
|
|
||||||
className="linkml-viewer__tag linkml-viewer__tag--mapping linkml-viewer__tag--related linkml-viewer__tag--clickable"
|
|
||||||
onClick={() => setOntologyPopupCurie(mapping)}
|
|
||||||
title={`View ontology term: ${mapping}`}
|
|
||||||
>
|
|
||||||
{mapping}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{/* Comments section */}
|
{/* Comments section */}
|
||||||
{slot.comments && slot.comments.length > 0 && (
|
{slot.comments && slot.comments.length > 0 && (
|
||||||
<div className="linkml-viewer__comments">
|
<div className="linkml-viewer__comments">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue