diff --git a/Parts/Flag.tsx b/Parts/Flag.tsx new file mode 100644 index 0000000..799775c --- /dev/null +++ b/Parts/Flag.tsx @@ -0,0 +1,12 @@ +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 ( + ...}> + + + ); +} \ No newline at end of file