import React, { Fragment, useState } from "react"; import { Trans, useTranslation } from "react-i18next"; import { Button } from "./Button/Button"; import { Menu, Transition } from "@headlessui/react"; import classNames from "classnames"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faLanguage } from "@fortawesome/free-solid-svg-icons"; type Props = React.ComponentPropsWithoutRef<"div">; const LocalizationButton = (props: Props) => { const { t, i18n } = useTranslation(); const changeLanguage = (lng: string) => { i18n.changeLanguage(lng); setLanguage(lng); }; const [language, setLanguage] = useState("en"); return (