From fbd317cbe79526b57d5b87b3d6473d69fb0c938c Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Mon, 29 Apr 2024 10:14:03 -0500 Subject: [PATCH] SCRUM-3986 update StrainBackground identifier --- src/components/dataTable/StrainBackground.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/dataTable/StrainBackground.js b/src/components/dataTable/StrainBackground.js index f090b10cd..9854832b7 100644 --- a/src/components/dataTable/StrainBackground.js +++ b/src/components/dataTable/StrainBackground.js @@ -1,13 +1,16 @@ import ExternalLink from '../ExternalLink'; +import { getIdentifier } from './utils'; function StrainBackground({strainBackground}) { - if(strainBackground?.curie && strainBackground?.name) { - const strainName = ; - const strain = strainBackground.curie.slice('SGD:'.length); - return {strainName}; - } - return <>; + const indentifier = getIdentifier(strainBackground); + + if(!indentifier || !strainBackground?.name) return null; + + const strainName = ; + const strain = indentifier.slice('SGD:'.length); + + return {strainName}; } export default StrainBackground;