phone number editing controls are functional

This commit is contained in:
or-else
2023-01-22 18:57:19 -08:00
parent b766e827c9
commit b0bf93a4d9
13 changed files with 724 additions and 636 deletions
+9
View File
@@ -99,3 +99,12 @@ export function letterTileColorId(userId) {
export function idToColorClass(id, light, fg) {
return (light ? 'lt-' : 'dk-') + (fg ? 'fg-' : 'bg-') + letterTileColorId(id);
}
// Takes ISO Alpha-2 country code, like 'US' and converts it to a flag emoji.
export function flagEmoji(countryCode) {
const codePoints = countryCode
.toUpperCase()
.split('')
.map(char => 0x1F1A5 + char.charCodeAt());
return String.fromCodePoint(...codePoints);
}