Skip to content

Commit

Permalink
fix: Show download csv button in class dashboard [PT-187816321]
Browse files Browse the repository at this point in the history
This also fixes the preview warning message showing in the class dashboard.
  • Loading branch information
dougmartin committed Jul 2, 2024
1 parent 2dd55a1 commit 4d96cea
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/lara-app/components/runtime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,19 @@ export const RuntimeComponent = ({
// of the container changes
const height = showQrContainer ? 675 : "auto";

const showImportButton = !reportOrPreviewMode;
const showDownloadCSVButton = !!experimentData;

return (
<div style={{height}}>
{!previewMode ? undefined :
{previewMode && !reportMode &&
<div className={css.previewModeNotice}>
You are viewing a preview of the activity. <strong>NO DATA IS BEING SAVED!</strong>
</div>}
{reportOrPreviewMode ? undefined :
<div className={css.topBar}>
<div className={css.button} onClick={handleUploadAgain}>Import</div>
{experimentData && <div className={css.button} onClick={handleDownloadCSV}>Download CSV</div>}
</div>}
{(showImportButton || showDownloadCSVButton) ? <div className={css.topBar}>
{showImportButton && <div className={css.button} onClick={handleUploadAgain}>Import</div>}
{showDownloadCSVButton && <div className={css.button} onClick={handleDownloadCSV}>Download CSV</div>}
</div> : undefined}
<div className={css.runtimeExperiment}>
<Experiment
experiment={experiment}
Expand Down

0 comments on commit 4d96cea

Please sign in to comment.