From 555425d97eba920c39091c49e90f5223c8d9b20a Mon Sep 17 00:00:00 2001 From: natsoni Date: Tue, 27 Aug 2024 14:49:54 +0200 Subject: [PATCH] Handle city-states in geolocation component --- .../shared/components/geolocation/geolocation.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/app/shared/components/geolocation/geolocation.component.ts b/frontend/src/app/shared/components/geolocation/geolocation.component.ts index 1a498a1b2..85e4b6e53 100644 --- a/frontend/src/app/shared/components/geolocation/geolocation.component.ts +++ b/frontend/src/app/shared/components/geolocation/geolocation.component.ts @@ -70,6 +70,12 @@ export class GeolocationComponent implements OnChanges { if (this.type === 'node') { const city = this.data.city ? this.data.city : ''; + // Handle city-states like Singapore or Hong Kong + if (city && city === this.data?.country) { + this.formattedLocation = `${this.data.country} ${getFlagEmoji(this.data.iso)}`; + return; + } + // City this.formattedLocation = `${city}`;