Skip to content

Commit

Permalink
Pull country name from frontend locale instead of backend (#10648)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorbg authored Jan 19, 2025
1 parent f751ec7 commit 4cd51b8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { DateTime } from 'luxon';
import { useDispatch } from '../../../lib/providers/StoreProvider';
import { setMessage } from '../Register/RegistrationMessage';
import I18n from '../../../lib/i18n';
import { countries } from '../../../lib/wca-data.js.erb';

function V3csvExport(selected, registrations, competition) {
let csvContent = 'data:text/csv;charset=utf-8,';
Expand All @@ -14,7 +15,7 @@ function V3csvExport(selected, registrations, competition) {
.forEach((registration) => {
csvContent += `${registration.competing.registration_status === 'accepted' ? 'a' : 'p'},"${
registration.user.name
}","${registration.user.country.name}",${
}","${countries.byIso2[registration.user.country.iso2].name}",${
registration.user.wca_id
},${registration.user.dob},${
registration.user.gender
Expand Down

0 comments on commit 4cd51b8

Please sign in to comment.