mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Fixed formatRegion method. Closes #3344
This commit is contained in:
parent
337a5b6e33
commit
8d3aad8454
3 changed files with 23 additions and 23 deletions
|
|
@ -79,7 +79,7 @@
|
||||||
"@umami/redis-client": "^0.26.0",
|
"@umami/redis-client": "^0.26.0",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"chalk": "^4.1.1",
|
"chalk": "^4.1.1",
|
||||||
"chart.js": "^4.4.2",
|
"chart.js": "^4.4.9",
|
||||||
"chartjs-adapter-date-fns": "^3.0.0",
|
"chartjs-adapter-date-fns": "^3.0.0",
|
||||||
"classnames": "^2.3.1",
|
"classnames": "^2.3.1",
|
||||||
"colord": "^2.9.2",
|
"colord": "^2.9.2",
|
||||||
|
|
@ -121,12 +121,12 @@
|
||||||
"serialize-error": "^12.0.0",
|
"serialize-error": "^12.0.0",
|
||||||
"thenby": "^1.3.4",
|
"thenby": "^1.3.4",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"zod": "^3.24.1",
|
"zod": "^3.24.3",
|
||||||
"zustand": "^4.5.5"
|
"zustand": "^4.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@formatjs/cli": "^4.2.29",
|
"@formatjs/cli": "^4.2.29",
|
||||||
"@netlify/plugin-nextjs": "^5.8.1",
|
"@netlify/plugin-nextjs": "^5.10.6",
|
||||||
"@rollup/plugin-alias": "^5.0.0",
|
"@rollup/plugin-alias": "^5.0.0",
|
||||||
"@rollup/plugin-commonjs": "^25.0.4",
|
"@rollup/plugin-commonjs": "^25.0.4",
|
||||||
"@rollup/plugin-json": "^6.0.0",
|
"@rollup/plugin-json": "^6.0.0",
|
||||||
|
|
|
||||||
36
pnpm-lock.yaml
generated
36
pnpm-lock.yaml
generated
|
|
@ -51,11 +51,11 @@ importers:
|
||||||
specifier: ^4.1.1
|
specifier: ^4.1.1
|
||||||
version: 4.1.2
|
version: 4.1.2
|
||||||
chart.js:
|
chart.js:
|
||||||
specifier: ^4.4.2
|
specifier: ^4.4.9
|
||||||
version: 4.4.8
|
version: 4.4.9
|
||||||
chartjs-adapter-date-fns:
|
chartjs-adapter-date-fns:
|
||||||
specifier: ^3.0.0
|
specifier: ^3.0.0
|
||||||
version: 3.0.0(chart.js@4.4.8)(date-fns@2.30.0)
|
version: 3.0.0(chart.js@4.4.9)(date-fns@2.30.0)
|
||||||
classnames:
|
classnames:
|
||||||
specifier: ^2.3.1
|
specifier: ^2.3.1
|
||||||
version: 2.5.1
|
version: 2.5.1
|
||||||
|
|
@ -177,8 +177,8 @@ importers:
|
||||||
specifier: ^9.0.0
|
specifier: ^9.0.0
|
||||||
version: 9.0.1
|
version: 9.0.1
|
||||||
zod:
|
zod:
|
||||||
specifier: ^3.24.1
|
specifier: ^3.24.3
|
||||||
version: 3.24.2
|
version: 3.24.3
|
||||||
zustand:
|
zustand:
|
||||||
specifier: ^4.5.5
|
specifier: ^4.5.5
|
||||||
version: 4.5.6(@types/react@19.1.2)(immer@9.0.21)(react@19.1.0)
|
version: 4.5.6(@types/react@19.1.2)(immer@9.0.21)(react@19.1.0)
|
||||||
|
|
@ -187,8 +187,8 @@ importers:
|
||||||
specifier: ^4.2.29
|
specifier: ^4.2.29
|
||||||
version: 4.8.4(ts-jest@29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.25.2)(jest@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.8.3)))(typescript@5.8.3))
|
version: 4.8.4(ts-jest@29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.25.2)(jest@29.7.0(@types/node@22.14.1)(ts-node@10.9.2(@types/node@22.14.1)(typescript@5.8.3)))(typescript@5.8.3))
|
||||||
'@netlify/plugin-nextjs':
|
'@netlify/plugin-nextjs':
|
||||||
specifier: ^5.8.1
|
specifier: ^5.10.6
|
||||||
version: 5.10.5
|
version: 5.10.6
|
||||||
'@rollup/plugin-alias':
|
'@rollup/plugin-alias':
|
||||||
specifier: ^5.0.0
|
specifier: ^5.0.0
|
||||||
version: 5.1.1(rollup@3.29.5)
|
version: 5.1.1(rollup@3.29.5)
|
||||||
|
|
@ -1800,8 +1800,8 @@ packages:
|
||||||
'@napi-rs/wasm-runtime@0.2.8':
|
'@napi-rs/wasm-runtime@0.2.8':
|
||||||
resolution: {integrity: sha512-OBlgKdX7gin7OIq4fadsjpg+cp2ZphvAIKucHsNfTdJiqdOmOEwQd/bHi0VwNrcw5xpBJyUw6cK/QilCqy1BSg==}
|
resolution: {integrity: sha512-OBlgKdX7gin7OIq4fadsjpg+cp2ZphvAIKucHsNfTdJiqdOmOEwQd/bHi0VwNrcw5xpBJyUw6cK/QilCqy1BSg==}
|
||||||
|
|
||||||
'@netlify/plugin-nextjs@5.10.5':
|
'@netlify/plugin-nextjs@5.10.6':
|
||||||
resolution: {integrity: sha512-4Lw6fy4VMroBGcrdwjhWfnejmeqbTRgqhQKYIBT0AejzPv4HzxLndtSjqcgZp8gXQ7biEfJvk26cXW6rFnM+dw==}
|
resolution: {integrity: sha512-j/Jt/MMFy70f1LIa6qkviNWVoEIoF9ZICdDC3TF/IvStxWHGAYHm8pkqqbi1VqzjUEDUNu1ZGjo+VElZyenRBg==}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: '>=18.0.0'}
|
||||||
|
|
||||||
'@next/env@15.3.0':
|
'@next/env@15.3.0':
|
||||||
|
|
@ -2834,8 +2834,8 @@ packages:
|
||||||
charenc@0.0.2:
|
charenc@0.0.2:
|
||||||
resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==}
|
resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==}
|
||||||
|
|
||||||
chart.js@4.4.8:
|
chart.js@4.4.9:
|
||||||
resolution: {integrity: sha512-IkGZlVpXP+83QpMm4uxEiGqSI7jFizwVtF3+n5Pc3k7sMO+tkd0qxh2OzLhenM0K80xtmAONWGBn082EiBQSDA==}
|
resolution: {integrity: sha512-EyZ9wWKgpAU0fLJ43YAEIF8sr5F2W3LqbS40ZJyHIner2lY14ufqv2VMp69MAiZ2rpwxEUxEhIH/0U3xyRynxg==}
|
||||||
engines: {pnpm: '>=8'}
|
engines: {pnpm: '>=8'}
|
||||||
|
|
||||||
chartjs-adapter-date-fns@3.0.0:
|
chartjs-adapter-date-fns@3.0.0:
|
||||||
|
|
@ -6684,8 +6684,8 @@ packages:
|
||||||
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
zod@3.24.2:
|
zod@3.24.3:
|
||||||
resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==}
|
resolution: {integrity: sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==}
|
||||||
|
|
||||||
zustand@4.5.6:
|
zustand@4.5.6:
|
||||||
resolution: {integrity: sha512-ibr/n1hBzLLj5Y+yUcU7dYw8p6WnIVzdJbnX+1YpaScvZVF2ziugqHs+LAmHw4lWO9c/zRj+K1ncgWDQuthEdQ==}
|
resolution: {integrity: sha512-ibr/n1hBzLLj5Y+yUcU7dYw8p6WnIVzdJbnX+1YpaScvZVF2ziugqHs+LAmHw4lWO9c/zRj+K1ncgWDQuthEdQ==}
|
||||||
|
|
@ -8355,7 +8355,7 @@ snapshots:
|
||||||
'@tybys/wasm-util': 0.9.0
|
'@tybys/wasm-util': 0.9.0
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@netlify/plugin-nextjs@5.10.5': {}
|
'@netlify/plugin-nextjs@5.10.6': {}
|
||||||
|
|
||||||
'@next/env@15.3.0': {}
|
'@next/env@15.3.0': {}
|
||||||
|
|
||||||
|
|
@ -9487,13 +9487,13 @@ snapshots:
|
||||||
|
|
||||||
charenc@0.0.2: {}
|
charenc@0.0.2: {}
|
||||||
|
|
||||||
chart.js@4.4.8:
|
chart.js@4.4.9:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@kurkle/color': 0.3.4
|
'@kurkle/color': 0.3.4
|
||||||
|
|
||||||
chartjs-adapter-date-fns@3.0.0(chart.js@4.4.8)(date-fns@2.30.0):
|
chartjs-adapter-date-fns@3.0.0(chart.js@4.4.9)(date-fns@2.30.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
chart.js: 4.4.8
|
chart.js: 4.4.9
|
||||||
date-fns: 2.30.0
|
date-fns: 2.30.0
|
||||||
|
|
||||||
check-more-types@2.24.0: {}
|
check-more-types@2.24.0: {}
|
||||||
|
|
@ -13941,7 +13941,7 @@ snapshots:
|
||||||
|
|
||||||
yocto-queue@0.1.0: {}
|
yocto-queue@0.1.0: {}
|
||||||
|
|
||||||
zod@3.24.2: {}
|
zod@3.24.3: {}
|
||||||
|
|
||||||
zustand@4.5.6(@types/react@19.1.2)(immer@9.0.21)(react@19.1.0):
|
zustand@4.5.6(@types/react@19.1.2)(immer@9.0.21)(react@19.1.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ export function useFormat() {
|
||||||
return countryNames[value] || value;
|
return countryNames[value] || value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatRegion = (value: string): string => {
|
const formatRegion = (value?: string): string => {
|
||||||
const [country] = value.split('-');
|
const [country] = value?.split('-') || [];
|
||||||
return regions[value] ? `${regions[value]}, ${countryNames[country]}` : value;
|
return regions[value] ? `${regions[value]}, ${countryNames[country]}` : value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue