Skip to content

Commit

Permalink
Merge pull request #674 from UKHSA-Internal/COVP-147_fix_renamed_radi…
Browse files Browse the repository at this point in the history
…o_button_options

COVP-147Change radio button to "Cases" on Cases by specimen date age demographics chart
  • Loading branch information
adebayoolabintan authored Jun 20, 2023
2 parents e42e0e3 + f194735 commit c133252
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/components/Card/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,16 @@ const CardContent = ({ tabs: singleOptionTabs=null, cardType, download=[], param
// that depends on the active tab (All/First episodes/Reinfections)
const getDownloadUrl = () => {
if (heading === "Cases by specimen date age demographics") {
var metric = ""
var metric = ["newCasesBySpecimenDateAgeDemographics"]
switch (active) {
case 'All':
metric = ["newCasesBySpecimenDateAgeDemographics"];
break;
case 'First episodes':
metric = ["newFirstEpisodesBySpecimenDateAgeDemographics"];
break;
case 'Reinfections':
metric = ["newReinfectionsBySpecimenDateAgeDemographics"];
break;
default:
metric = download;
case 'First episodes':
metric = ["newFirstEpisodesBySpecimenDateAgeDemographics"];
break;
case 'Reinfections':
metric = ["newReinfectionsBySpecimenDateAgeDemographics"];
break;
case 'Cases':
default:
}

return fieldToStructure(metric, params)
Expand Down

0 comments on commit c133252

Please sign in to comment.