Skip to content

Commit

Permalink
Merge pull request #160 from concord-consortium/187816321-add-downloa…
Browse files Browse the repository at this point in the history
…d-csv-to-dashboard

fix: Show download csv button in class dashboard [PT-187816321]
  • Loading branch information
dougmartin authored Jul 2, 2024
2 parents 2dd55a1 + 4d96cea commit 30f0ae1
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 30f0ae1

Please sign in to comment.