mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
19 lines
388 B
TypeScript
19 lines
388 B
TypeScript
interface WeaponImageProps
|
|
extends React.ButtonHTMLAttributes<HTMLImageElement> {
|
|
weapon: string;
|
|
}
|
|
|
|
export function WeaponImage(props: WeaponImageProps) {
|
|
return (
|
|
<img
|
|
src={`/img/weapons/${encodeURIComponent(
|
|
props.weapon.replaceAll(".", "")
|
|
)}.webp`}
|
|
alt={props.weapon}
|
|
title={props.weapon}
|
|
loading="lazy"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|