Skip to content

Commit

Permalink
Pretify the code
Browse files Browse the repository at this point in the history
  • Loading branch information
forus committed Nov 20, 2024
1 parent 846b9d4 commit c29cb99
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 55 deletions.
4 changes: 2 additions & 2 deletions src/appShell/App/usageAgreements/StudyAgreement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export const StudyAgreement: React.FunctionComponent<{}> = function({}) {
href="https://mskcc.sharepoint.com/sites/pub-ResearchDG/SitePages/Home.aspx?ga=1"
target="_blank"
>
MSK-IMPACT Memorial Hospital Research Data Governance publication
guidelines
MSK-IMPACT Memorial Hospital Research Data Governance
publication guidelines
</a>
.
</>,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/studyView/virtualStudy/VirtualStudy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ export default class VirtualStudy extends React.Component<
currently selected.
Furthermore, you can
define this Virtual
Study to be either static
or dynamic:
Study to be either
static or dynamic:
</p>
<ul>
<li>
Expand Down
108 changes: 57 additions & 51 deletions src/pages/studyView/virtualStudy/VirtualStudyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,54 +13,60 @@ export interface IVirtualStudyModalProps {
onHide: () => void;
}

export const VirtualStudyModal: React.FunctionComponent<IVirtualStudyModalProps> = observer(({
appStore,
pageStore,
message,
onHide,
}) => {
const isLoading = [
pageStore.filteredVirtualStudies,
pageStore.studyWithSamples,
pageStore.filteredVirtualStudies,
pageStore.molecularProfileNameSet,
pageStore.molecularProfileNameSet,
].some(result => result.isPending);
return (
<Modal onHide={onHide} show={true}>
<Modal.Header closeButton>
<Modal.Title>Create a Virtual Study</Modal.Title>
</Modal.Header>
<Modal.Body>
{isLoading ?
<LoadingIndicator isLoading={true}/>
: <>
{message || null}
<VirtualStudy
user={appStore.userName}
name={
pageStore.isSingleVirtualStudyPageWithoutFilter
? pageStore.filteredVirtualStudies.result[0].data
.name
: undefined
}
description={
pageStore.isSingleVirtualStudyPageWithoutFilter
? pageStore.filteredVirtualStudies.result[0].data
.description
: undefined
}
studyWithSamples={pageStore.studyWithSamples.result}
selectedSamples={pageStore.selectedSamples.result}
filter={pageStore.userSelections}
attributesMetaSet={pageStore.chartMetaSet}
molecularProfileNameSet={
pageStore.molecularProfileNameSet.result || {}
}
caseListNameSet={pageStore.caseListNameSet.result || {}}
/>
</>}
</Modal.Body>
</Modal>
);
});
export const VirtualStudyModal: React.FunctionComponent<IVirtualStudyModalProps> = observer(
({ appStore, pageStore, message, onHide }) => {
const isLoading = [
pageStore.filteredVirtualStudies,
pageStore.studyWithSamples,
pageStore.filteredVirtualStudies,
pageStore.molecularProfileNameSet,
pageStore.molecularProfileNameSet,
].some(result => result.isPending);
return (
<Modal onHide={onHide} show={true}>
<Modal.Header closeButton>
<Modal.Title>Create a Virtual Study</Modal.Title>
</Modal.Header>
<Modal.Body>
{isLoading ? (
<LoadingIndicator isLoading={true} />
) : (
<>
{message || null}
<VirtualStudy
user={appStore.userName}
name={
pageStore.isSingleVirtualStudyPageWithoutFilter
? pageStore.filteredVirtualStudies
.result[0].data.name
: undefined
}
description={
pageStore.isSingleVirtualStudyPageWithoutFilter
? pageStore.filteredVirtualStudies
.result[0].data.description
: undefined
}
studyWithSamples={
pageStore.studyWithSamples.result
}
selectedSamples={
pageStore.selectedSamples.result
}
filter={pageStore.userSelections}
attributesMetaSet={pageStore.chartMetaSet}
molecularProfileNameSet={
pageStore.molecularProfileNameSet.result ||
{}
}
caseListNameSet={
pageStore.caseListNameSet.result || {}
}
/>
</>
)}
</Modal.Body>
</Modal>
);
}
);

0 comments on commit c29cb99

Please sign in to comment.