From dbc942b6298d2bab89f16b511c8fa1c67b4482fb Mon Sep 17 00:00:00 2001 From: Carlos Cruz Date: Mon, 2 Dec 2024 23:23:57 +0000 Subject: [PATCH] [Platform]: fix the evidence page and publication across UI (#587) * fix: evidence page * fix: publication issues --- .../src/evidence/GWASCredibleSets/Body.jsx | 15 ++++++++------- .../src/evidence/GWASCredibleSets/Summary.jsx | 2 +- .../PublicationsDrawer/PublicationWrapper.jsx | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/sections/src/evidence/GWASCredibleSets/Body.jsx b/packages/sections/src/evidence/GWASCredibleSets/Body.jsx index 8d713562c..21750ec98 100644 --- a/packages/sections/src/evidence/GWASCredibleSets/Body.jsx +++ b/packages/sections/src/evidence/GWASCredibleSets/Body.jsx @@ -18,7 +18,7 @@ import { dataTypesMap } from "../../dataTypes"; import GWAS_CREDIBLE_SETS_QUERY from "./sectionQuery.gql"; import { mantissaExponentComparator } from "../../utils/comparators"; -function getColumns() { +function getColumns(targetSymbol) { return [ { id: "credibleSet", @@ -51,9 +51,7 @@ function getColumns() { id: "study", label: "Study", renderCell: ({ credibleSet }) => { - return ( - {credibleSet?.study.id} - ); + return {credibleSet?.study.id}; }, }, { @@ -104,7 +102,8 @@ function getColumns() { id: "confidence", label: "Fine-mapping confidence", sortable: true, - tooltip: "Fine-mapping confidence based on the quality of the linkage-desequilibrium information available and fine-mapping method", + tooltip: + "Fine-mapping confidence based on the quality of the linkage-desequilibrium information available and fine-mapping method", renderCell: ({ credibleSet }) => { if (!credibleSet?.confidence) return naLabel; return ( @@ -148,11 +147,13 @@ function getColumns() { { id: "publication", label: "Publication", - renderCell: ({ credibleSet }) => { + renderCell: ({ credibleSet, disease }) => { const { publicationFirstAuthor, publicationDate, pubmedId } = credibleSet?.study ?? {}; if (!publicationFirstAuthor) return naLabel; return ( )} - {fullTextOpen && isOpenAccess && urlAiApi && ( + {symbol && name && fullTextOpen && isOpenAccess && urlAiApi && ( )}