From 4a0b93be3b59c9b3bb558576218ae17212c97cff Mon Sep 17 00:00:00 2001 From: jay-hodgson Date: Wed, 8 Jan 2025 10:00:42 -0800 Subject: [PATCH] PORTALS-3372: If LLFS_Metabolomics study key, redirect to LLFS --- .../elportal/src/pages/StudyDetailsPage.tsx | 121 ++++++++++-------- 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/apps/portals/elportal/src/pages/StudyDetailsPage.tsx b/apps/portals/elportal/src/pages/StudyDetailsPage.tsx index 5ccff1f07b..d31225af84 100644 --- a/apps/portals/elportal/src/pages/StudyDetailsPage.tsx +++ b/apps/portals/elportal/src/pages/StudyDetailsPage.tsx @@ -7,6 +7,7 @@ import { import DetailsPage from '@sage-bionetworks/synapse-portal-framework/components/DetailsPage/index' import { MarkdownSynapseFromColumnData } from '@sage-bionetworks/synapse-portal-framework/components/DetailsPage/markdown/MarkdownSynapseFromColumnData' import RedirectWithQuery from '@sage-bionetworks/synapse-portal-framework/components/RedirectWithQuery' +import RedirectToURL from '@sage-bionetworks/synapse-portal-framework/components/RedirectToURL' import { useGetPortalComponentSearchParams } from '@sage-bionetworks/synapse-portal-framework/utils/UseGetPortalComponentSearchParams' import { ColumnSingleValueFilterOperator } from '@sage-bionetworks/synapse-types' import { Outlet, RouteObject } from 'react-router-dom' @@ -49,63 +50,71 @@ export const studyDetailsPageRoutes: RouteObject[] = [ { path: studyDetailsPageTabConfig[0].path, element: ( - - ), - }, - { - id: 'Acknowledgement', - title: 'Acknowledgement', - element: ( - - ), - }, - { - id: 'acknowledgementFull', - element: ( - - ), - }, - { - id: 'Methods', - title: 'Methods', - element: , - }, - { - id: 'Related Studies', - title: 'Related Studies', - element: ( - - {({ value }) => { - if (!value) { - return null - } + <> + + ), + }, + { + id: 'Acknowledgement', + title: 'Acknowledgement', + element: ( + + ), + }, + { + id: 'acknowledgementFull', + element: ( + + ), + }, + { + id: 'Methods', + title: 'Methods', + element: , + }, + { + id: 'Related Studies', + title: 'Related Studies', + element: ( + + {({ value }) => { + if (!value) { + return null + } - return ( - - ) - }} - - ), - }, - ]} - /> + return ( + + ) + }} + + ), + }, + ]} + /> + + ), }, {