move flag

This commit is contained in:
honzapatCZ 2024-10-18 19:15:50 +02:00
parent fa35bdb992
commit 4c892816ba

View File

@ -1,12 +0,0 @@
import { Country } from "@services/accounting-api";
import { lazy, Suspense } from 'react';
export default function Flag({ country, ...props }: { country: Country | "EU" }) {
const FlagIcon = lazy(() => import(`country-flag-icons/react/3x2`).then(module => ({ default: module[country] })));
return (
<Suspense fallback={<div {...props}>...</div>}>
<FlagIcon {...props}/>
</Suspense>
);
}