Adds Mullvad and IP blacklist check widgets

This commit is contained in:
Alicia Sykes
2022-04-14 19:02:51 +01:00
parent a6f3c90722
commit 4c713bfce6
9 changed files with 337 additions and 3 deletions

View File

@@ -46,6 +46,12 @@ export const timestampToDateTime = (timestamp) => {
return `${timestampToDate(timestamp)} at ${timestampToTime(timestamp)}`;
};
/* Given a 2-letter country ISO code, return the countries name */
export const getCountryFromIso = (iso) => {
const regionNames = new Intl.DisplayNames(['en'], { type: 'region' });
return regionNames.of(iso);
};
/* Given a 2-digit country code, return path to flag image from Flagpedia */
export const getCountryFlag = (countryCode, dimens) => {
const protocol = 'https';