From 4b6bafb414db37f39a43a4791ed14ee8fb71b24e Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 16 Jan 2025 17:44:58 -0500 Subject: [PATCH] Defer loading of gene panel data until plots tab is shown --- src/pages/studyView/StudyViewPage.tsx | 125 +----------------- .../studyView/StudyViewPlotsTabWrapper.tsx | 72 ++++++++++ 2 files changed, 75 insertions(+), 122 deletions(-) create mode 100644 src/pages/studyView/StudyViewPlotsTabWrapper.tsx diff --git a/src/pages/studyView/StudyViewPage.tsx b/src/pages/studyView/StudyViewPage.tsx index c99856eca9b..95d2ce42faf 100644 --- a/src/pages/studyView/StudyViewPage.tsx +++ b/src/pages/studyView/StudyViewPage.tsx @@ -80,6 +80,7 @@ import { import { VirtualStudyModal } from 'pages/studyView/virtualStudy/VirtualStudyModal'; import PlotsTab from 'shared/components/plots/PlotsTab'; import { RFC80Test } from 'pages/studyView/rfc80Tester'; +import { PlotsTabWrapper } from 'pages/studyView/StudyViewPlotsTabWrapper'; export interface IStudyViewPageProps { routing: any; @@ -753,129 +754,9 @@ export default class StudyViewPage extends React.Component< } > - diff --git a/src/pages/studyView/StudyViewPlotsTabWrapper.tsx b/src/pages/studyView/StudyViewPlotsTabWrapper.tsx new file mode 100644 index 00000000000..ebfeb45a1b1 --- /dev/null +++ b/src/pages/studyView/StudyViewPlotsTabWrapper.tsx @@ -0,0 +1,72 @@ +import * as React from 'react'; +import { StudyViewPageStore } from 'pages/studyView/StudyViewPageStore'; +import StudyViewURLWrapper from 'pages/studyView/StudyViewURLWrapper'; +import { observer } from 'mobx-react'; +import PlotsTab from 'shared/components/plots/PlotsTab'; + +export const PlotsTabWrapper: React.FunctionComponent<{ + store: StudyViewPageStore; + urlWrapper: StudyViewURLWrapper; +}> = observer(function({ store, urlWrapper }) { + return ( + + ); +});