import React from "react"; import { SvgProps } from "../../../components/Svg"; import Text from "../../../components/Text/Text"; import Dropdown from "../../../components/Dropdown/Dropdown"; import Button from "../../../components/Button/Button"; import * as IconModule from "../icons"; import { LangType } from "../types"; import MenuButton from "./MenuButton"; const Icons = (IconModule as unknown) as { [key: string]: React.FC }; const { LanguageIcon } = Icons; interface Props { currentLang: string; langs: LangType[]; setLang: (lang: LangType) => void; } const LangSelector: React.FC = ({ currentLang, langs, setLang }) => ( }> {currentLang?.toUpperCase()} } > {langs.map((lang) => ( setLang(lang)} // Safari fix style={{ minHeight: "32px", height: "auto" }} > {lang.language} ))} ); export default React.memo(LangSelector, (prev, next) => prev.currentLang === next.currentLang);