import React from "react"; import { useRouter } from "next/router"; import { useTranslation } from "next-i18next"; import * as ToggleGroup from "@radix-ui/react-toggle-group"; import "./index.scss"; interface Props { currentElement: number; sendValue: (value: string) => void; } const ElementToggle = (props: Props) => { const router = useRouter(); const { t } = useTranslation("common"); const locale = router.locale && ["en", "ja"].includes(router.locale) ? router.locale : "en"; return ( {t("elements.null")} {t("elements.wind")} {t("elements.fire")} {t("elements.water")} {t("elements.earth")} {t("elements.dark")} {t("elements.light")} ); }; export default ElementToggle;