mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 20:32:48 +00:00
13 lines
319 B
TypeScript
13 lines
319 B
TypeScript
let timezonesPromise = null
|
|
export async function getTimezones() {
|
|
timezonesPromise ||= new Promise(async (resolve, reject) => {
|
|
try {
|
|
let response = await fetch('/frontend/_timezones.json')
|
|
resolve(await response.json())
|
|
} catch (e) {
|
|
reject(e)
|
|
}
|
|
})
|
|
return await timezonesPromise
|
|
}
|