import React from 'react'; import { setLanguage, useTranslation } from '@i18next-toolkit/react'; import { Button, Dropdown } from 'antd'; import { LuLanguages } from 'react-icons/lu'; import { CountryFlag } from './CountryFlag'; export const LanguageSelector: React.FC = React.memo(() => { const { i18n } = useTranslation(); return ( , }, { label: 'Deutsch', key: 'de', itemIcon: , }, { label: 'Français', key: 'fr', itemIcon: , }, { label: '日本語', key: 'jp', itemIcon: , }, { label: 'Português', key: 'pt', itemIcon: , }, { label: 'Русский', key: 'ru', itemIcon: , }, { label: '简体中文', key: 'zh', itemIcon: , }, ], onClick: (info) => { setLanguage(info.key); }, }} >