add global and country ranking cards on the player page
All checks were successful
Deploy / deploy (push) Successful in 2m23s

This commit is contained in:
Lee
2024-09-27 21:19:44 +01:00
parent 3709794d11
commit a7465a6dcd
13 changed files with 285 additions and 117 deletions

View File

@ -1,16 +1,17 @@
type Props = {
country: string;
code: string;
size?: number;
};
export default function CountryFlag({ country, size = 24 }: Props) {
export default function CountryFlag({ code, size = 24 }: Props) {
return (
// eslint-disable-next-line @next/next/no-img-element
<img
alt="Player Country"
src={`/assets/flags/${country}.png`}
src={`/assets/flags/${code}.png`}
width={size * 2}
height={size}
className={`w-[${size * 2}px] h-[${size}px] object-contain`}
/>
);
}