fix: close popup on lang select

This commit is contained in:
ascarbek 2023-03-27 19:28:26 +06:00
parent 09445411a3
commit 521fe13cfb

View File

@ -29,7 +29,10 @@ const supportedLanguages: { key: string; title: string }[] = [
export const LanguageSelectPopup = ({ onClose }: { onClose: () => void }) => {
const items: IPopupItem[] = supportedLanguages.map<IPopupItem>((item) => ({
onClick: () => void i18n.changeLanguage(item.key),
onClick: () => {
void i18n.changeLanguage(item.key);
onClose();
},
title: item.title,
icon: <></>,
}));