We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75c25c2 commit 54061d2Copy full SHA for 54061d2
src/hooks/useActivities.ts
@@ -4,13 +4,16 @@ import activities from '@/static/activities.json';
4
5
// standardize country names for consistency between mapbox and activities data
6
const standardizeCountryName = (country: string): string => {
7
- switch (country) {
8
- case '英国 / 英國':
9
- return '英国';
10
- case '美利坚合众国/美利堅合眾國':
11
- return '美国';
12
- default:
13
- return country;
+ if (country.includes('美利坚合众国')) {
+ return '美国';
+ }
+ if (country.includes('英国')) {
+ return '英国';
+ if (country.includes('印度尼西亚')) {
14
+ return '印度尼西亚';
15
+ } else {
16
+ return country;
17
}
18
};
19
0 commit comments