diff --git a/app/components/ui/FlagSvg.tsx b/app/components/ui/FlagSvg.tsx index 59ad8a9..eafa649 100644 --- a/app/components/ui/FlagSvg.tsx +++ b/app/components/ui/FlagSvg.tsx @@ -8,15 +8,8 @@ interface FlagSvgProps { title?: string; } -function colorAt(colors: string[], index: number): string { - return colors[index % colors.length]!; -} - export function FlagSvg({ config, size = 48, className, title }: FlagSvgProps) { - const colors = config.colors; - const c0 = colorAt(colors, 0); - const c1 = colorAt(colors, 1); - const c2 = colorAt(colors, 2); + const [c0 = "", c1 = "", c2 = ""] = config.colors; return (