Create geolocation component to format geolocation data

This commit is contained in:
nymkappa
2022-08-18 17:14:09 +02:00
parent 50d99634f7
commit e437f2125d
15 changed files with 263 additions and 40 deletions

View File

@@ -91,13 +91,3 @@ export function detectWebGL() {
return (gl && gl instanceof WebGLRenderingContext);
}
export function getFlagEmoji(countryCode) {
if (!countryCode) {
return '';
}
const codePoints = countryCode
.toUpperCase()
.split('')
.map(char => 127397 + char.charCodeAt());
return String.fromCodePoint(...codePoints);
}