Skip to content

Commit

Permalink
Amending tooltip message, bumping coverage #1195
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Glendenning committed Apr 29, 2022
1 parent b1a183d commit 5b8fb7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const DownloadButton: React.FC<DownloadButtonProps> = (
downloadInvestigation(idsUrl, entityId, entityName);
} else if (entityType === 'dataset') {
downloadDataset(idsUrl, entityId, entityName);
} else if (entityType === 'datafile') {
} else {
downloadDatafile(idsUrl, entityId, entityName);
}
};
Expand All @@ -59,7 +59,7 @@ const DownloadButton: React.FC<DownloadButtonProps> = (
{entitySize <= 0 ? (
<Tooltip
title={
<Typography>{t('buttons.tooltip.unable_to_download')}</Typography>
<Typography>{t('buttons.unable_to_download_tooltip')}</Typography>
}
id={`tooltip-${entityId}`}
placement="left"
Expand Down Expand Up @@ -99,7 +99,7 @@ const DownloadButton: React.FC<DownloadButtonProps> = (
{entitySize <= 0 ? (
<Tooltip
title={
<Typography>{t('buttons.tooltip.unable_to_download')}</Typography>
<Typography>{t('buttons.unable_to_download_tooltip')}</Typography>
}
id={`tooltip-${entityId}`}
placement="bottom"
Expand Down
4 changes: 1 addition & 3 deletions packages/datagateway-dataview/public/res/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,7 @@
"add_to_cart": "Add to selection",
"remove_from_cart": "Remove from selection",
"download": "Download",
"tooltip": {
"unable_to_download": "Unable to download - this file is empty"
}
"unable_to_download_tooltip": "Unable to download - this item is empty"
},
"advanced_filters": {
"show": "Show Advanced Filters",
Expand Down

0 comments on commit 5b8fb7c

Please sign in to comment.