Skip to content

Commit

Permalink
refactor: simplify button logic by removing redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
urvi-occ committed Nov 6, 2024
1 parent 27a9219 commit 8d54fce
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ const OpenFillRequestFormButton = (props) => {
)}
>
<Button
onClick={props.config.features.exportToWorkspace.fillRequestFormURL ? () => {
onClick={() => {
const combinedIds = props.discovery.selectedResources.map((item) => item._medical_sample_id).join(',');
const url = `${props.config.features.exportToWorkspace.fillRequestFormURL}?query=${encodeURIComponent(combinedIds)}`;
window.open(url, '_blank');
} : () => {
window.open(props.config.features.exportToWorkspace.fillRequestFormURL, '_blank');
}}
type='default'
className={`discovery-action-bar-button${(props.discovery.selectedResources.length === 0) ? '--disabled' : ''}`}
Expand Down

0 comments on commit 8d54fce

Please sign in to comment.