Sync deploy mirror and upstream error page

This commit is contained in:
2026-05-01 11:46:56 +02:00
parent 18cea8b0f0
commit 396712bb3d
8 changed files with 2185 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
export function shinyFlagUrl(countryCode, filesCdnUrl = '') {
const normalized = String(countryCode ?? '').trim().toUpperCase()
if (!/^[A-Z]{2}$/.test(normalized)) {
return null
}
const base = String(filesCdnUrl ?? '').replace(/\/+$/, '')
const relativePath = `/images/flags/shiny/24/${encodeURIComponent(normalized)}.png`
return base ? `${base}${relativePath}` : relativePath
}