Skip to content

Commit

Permalink
task/WP-320: No new tab when downloading files from My Data (#900)
Browse files Browse the repository at this point in the history
* Prevent new tab on download via preview modal

* Remove logging statement

* chore: npm run prettier:fix

---------

Co-authored-by: Wesley B <62723358+wesleyboar@users.noreply.github.com>
Co-authored-by: Wesley Bomar <wbomar@tacc.utexas.edu>
Co-authored-by: Chandra Y <cyemparala@tacc.utexas.edu>
  • Loading branch information
4 people authored Nov 20, 2023
1 parent 3f1471e commit a181f6a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ const DataFilesPreviewModal = () => {
<SectionMessage type="warning" className={styles['error-message']}>
{error}
</SectionMessage>
<Button className={styles.button} href={href} target="_blank">
<Button
className={styles.button}
href={href}
target={fileType === 'other' ? '' : '_blank'}
>
<i className="icon-exit" />
<span className="toolbar-button-text">Preview File</span>
</Button>
Expand Down

0 comments on commit a181f6a

Please sign in to comment.