import { t } from "@lingui/macro"; import { useLingui } from "@lingui/react"; import Image from "next/image"; import React from "react"; interface WeaponImageProps { name: string; size: 32 | 64 | 128; noTitle?: boolean; } const WeaponImage: React.FC = ({ name, size, noTitle }) => { const { i18n } = useLingui(); if (!name) return <>; return ( {i18n._(name)} ); function getTitle() { if (noTitle) return undefined; if (name === "RANDOM") return t`Random`; if (name === "RANDOM_GRIZZCO") return t`Random (Grizzco)`; return i18n._(name); } }; export default WeaponImage;