Skip to content

Commit

Permalink
add tooltip to download button
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s committed Oct 2, 2024
1 parent 7e86c8c commit 8c2afcb
Showing 1 changed file with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import TableCell from "@mui/material/TableCell";
import TableContainer from "@mui/material/TableContainer";
import TableHead from "@mui/material/TableHead";
import TableRow from "@mui/material/TableRow";
import Tooltip from "@mui/material/Tooltip";
import Typography from "@mui/material/Typography";
import DelayedLoadingIndicator from "components/DelayedLoadingIndicator";
import ErrorFallback from "components/Error/ErrorFallback";
Expand Down Expand Up @@ -141,20 +142,22 @@ const CollapsibleRow: React.FC<Submission> = (submission) => {
<TableCell>{submission.sessionId}</TableCell>
<TableCell>
{showDownloadButton && (
<IconButton
aria-label="download application"
size="small"
onClick={() => {
const zipUrl = `${
import.meta.env.VITE_APP_API_URL
}/download-application-files/${
submission.sessionId
}?localAuthority=${teamSlug}&email=${submissionEmail}`;
window.open(zipUrl, "_blank");
}}
>
<CloudDownload />
</IconButton>
<Tooltip arrow title="Download application data">
<IconButton
aria-label="download application"
size="small"
onClick={() => {
const zipUrl = `${
import.meta.env.VITE_APP_API_URL
}/download-application-files/${
submission.sessionId
}?localAuthority=${teamSlug}&email=${submissionEmail}`;
window.open(zipUrl, "_blank");
}}
>
<CloudDownload />
</IconButton>
</Tooltip>
)}
</TableCell>
<TableCell>
Expand Down

0 comments on commit 8c2afcb

Please sign in to comment.