mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 22:58:30 +01:00
Merge pull request #5483 from mempool/natsoni/handle-city-states
Handle city-states in geolocation component
This commit is contained in:
commit
fe4b39df80
1 changed files with 6 additions and 0 deletions
|
@ -70,6 +70,12 @@ export class GeolocationComponent implements OnChanges {
|
||||||
if (this.type === 'node') {
|
if (this.type === 'node') {
|
||||||
const city = this.data.city ? this.data.city : '';
|
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
|
// City
|
||||||
this.formattedLocation = `${city}`;
|
this.formattedLocation = `${city}`;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue