add iso codes to phone data

pull/342/head^2
Alex Turchyn 11 months ago committed by Pete Matsyburka
parent 4737b103c0
commit e3bed5ae67

File diff suppressed because it is too large Load Diff

@ -180,8 +180,8 @@ export default {
}, },
computed: { computed: {
countries () { countries () {
return phoneData.map(([name, dial, flag, tz]) => { return phoneData.map(([iso, name, dial, flag, tz]) => {
return { name, dial, flag, tz } return { iso, name, dial, flag, tz }
}) })
}, },
countriesDialIndex () { countriesDialIndex () {

@ -95,7 +95,7 @@ export default {
countryCode () { countryCode () {
const browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone const browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
const browserTz = browserTimeZone.split('/')[1] const browserTz = browserTimeZone.split('/')[1]
const country = phoneData.find(([a, b, c, tz]) => tz.includes(browserTz)) const country = phoneData.find(([a, b, c, e, tz]) => tz.includes(browserTz))
return country[0] return country[0]
}, },

Loading…
Cancel
Save