import { Button, Dropdown, MenuProps, Typography } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { ChevronDown } from 'lucide-react'; const langs = [ { code: 'en', label: 'English' }, { code: 'fr', label: 'Français' }, { code: 'es', label: 'Español' }, { code: 'ru', label: 'Русский' }, { code: 'zh', label: '中國人' }, ]; const langLabels = { en: 'English', fr: 'Français', es: 'Español', ru: 'Русский', zh: '中國人', } function LanguageSwitcher() { const { i18n } = useTranslation(); const [selected, setSelected] = React.useState(i18n.language); const onChange = (val: string) => { setSelected(val) } const handleChangeLanguage = () => { void i18n.changeLanguage(selected) localStorage.setItem('i18nextLng', selected) } const menuItems: MenuProps['items'] = langs.map((lang) => ({ key: lang.code, label: (