Skip to content

Commit

Permalink
fix(frontend): Fix bug on country picker
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiodmota committed May 14, 2024
1 parent 31003a9 commit 10b3156
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@testing-library/user-event": "^14.5.1",
"axios": "1.6.4",
"buffer": "^6.0.3",
"country-data": "^0.0.31",
"cx-portal-shared-components": "0.4.5",
"d3-fetch": "^3.0.1",
"env-cmd": "^10.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import UserService from "../../services/UserService";
import { CompanyUserContext } from "../../../contexts/companyuser";
import { GatesContext } from "../../../contexts/gates";
import DetailDialog from "../DetailDialog/DetailDialog";
import { countries } from "country-data";

const DashboardTable2 = (ratings, years) => {
//Data Fetch
Expand Down Expand Up @@ -100,7 +101,10 @@ const DashboardTable2 = (ratings, years) => {
if (countryS !== "none") {
const array = [];
globalData.forEach((gd) => {
if (gd.country === countryS.country) {
const countryFullName = countries[gd.country]
? countries[gd.country].name
: "";
if (countryFullName === countryS.country) {
array.push(gd);
}
});
Expand Down

0 comments on commit 10b3156

Please sign in to comment.