18 lines
373 B
TypeScript
18 lines
373 B
TypeScript
"use client"
|
|
|
|
import { flagCdnUrl } from "@/components/flag"
|
|
|
|
export function CountryFlagSvg({ iso, size = 22 }: { iso: string; size?: number }) {
|
|
const url = flagCdnUrl(iso, size)
|
|
if (!url) return null
|
|
const h = Math.round(size * 0.75)
|
|
return (
|
|
<image
|
|
href={url}
|
|
width={size}
|
|
height={h}
|
|
preserveAspectRatio="xMidYMid meet"
|
|
/>
|
|
)
|
|
}
|