From 4d96cea3e76d89c58a0a4b39739b9490271b9208 Mon Sep 17 00:00:00 2001 From: Doug Martin Date: Tue, 2 Jul 2024 06:00:29 -0400 Subject: [PATCH] fix: Show download csv button in class dashboard [PT-187816321] This also fixes the preview warning message showing in the class dashboard. --- src/lara-app/components/runtime.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lara-app/components/runtime.tsx b/src/lara-app/components/runtime.tsx index ac4a5be..f3391f2 100644 --- a/src/lara-app/components/runtime.tsx +++ b/src/lara-app/components/runtime.tsx @@ -225,17 +225,19 @@ export const RuntimeComponent = ({ // of the container changes const height = showQrContainer ? 675 : "auto"; + const showImportButton = !reportOrPreviewMode; + const showDownloadCSVButton = !!experimentData; + return (
- {!previewMode ? undefined : + {previewMode && !reportMode &&
You are viewing a preview of the activity. NO DATA IS BEING SAVED!
} - {reportOrPreviewMode ? undefined : -
-
Import
- {experimentData &&
Download CSV
} -
} + {(showImportButton || showDownloadCSVButton) ?
+ {showImportButton &&
Import
} + {showDownloadCSVButton &&
Download CSV
} +
: undefined}