Files
Liam 39efca8fb7
All checks were successful
deploy / deploy (push) Successful in 2m30s
use local assets for flags
2023-10-27 23:37:57 +01:00

25 lines
529 B
TypeScript

import { normalizedRegionName } from "@/utils/utils";
import Image from "next/image";
type CountryFlagProps = {
className?: string;
countryCode: string;
};
export default function CountyFlag({
className,
countryCode,
}: CountryFlagProps) {
return (
<Image
src={`/assets/flags/${countryCode.toLowerCase()}.svg`}
alt={`${normalizedRegionName(countryCode)} flag`}
title={normalizedRegionName(countryCode)}
width={64}
height={64}
className={className}
priority
/>
);
}