From 95293727dd713a702c39e14df8a5c01e99a2060e Mon Sep 17 00:00:00 2001 From: martyanov-av Date: Mon, 18 Mar 2024 17:22:21 +0300 Subject: [PATCH] feat: stop using emoji icons for language --- src/components/Controls/Controls.scss | 2 +- .../Controls/single-controls/LangControl.tsx | 20 ++++++------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/components/Controls/Controls.scss b/src/components/Controls/Controls.scss index 960b68f0..93a8f14d 100644 --- a/src/components/Controls/Controls.scss +++ b/src/components/Controls/Controls.scss @@ -15,7 +15,7 @@ padding: 4px 0; &_langs { - width: 120px; + width: 100px; } } diff --git a/src/components/Controls/single-controls/LangControl.tsx b/src/components/Controls/single-controls/LangControl.tsx index 2193b263..a9f2a542 100644 --- a/src/components/Controls/single-controls/LangControl.tsx +++ b/src/components/Controls/single-controls/LangControl.tsx @@ -13,16 +13,11 @@ import {ControlsLayoutContext} from '../ControlsLayout'; import '../Controls.scss'; -const ICONS: Record = { - en: '๐Ÿ‡ฌ๐Ÿ‡ง', - ru: '๐Ÿ‡ท๐Ÿ‡บ', - he: '๐Ÿ‡ฎ๐Ÿ‡ฑ', -}; const DEFAULT_LANGS = ['en', 'ru', 'he']; const LEGACY_LANG_ITEMS = [ - {value: Lang.En, text: 'English', icon: '๐Ÿ‡ฌ๐Ÿ‡ง'}, - {value: Lang.Ru, text: 'ะ ัƒััะบะธะน', icon: '๐Ÿ‡ท๐Ÿ‡บ'}, - {value: Lang.He, text: 'Hebrew', icon: '๐Ÿ‡ฎ๐Ÿ‡ฑ'}, + {value: Lang.En, text: 'English'}, + {value: Lang.Ru, text: 'ะ ัƒััะบะธะน'}, + {value: Lang.He, text: 'Hebrew'}, ]; const b = block('dc-controls'); @@ -36,7 +31,6 @@ interface ControlProps { interface ListItem { value: string; text: string; - icon?: string; } const LIST_ITEM_HEIGHT = 36; @@ -57,10 +51,9 @@ const LangControl = (props: ControlProps) => { return langData ? { - text: langData.name, - value: langData['1'], - icon: ICONS[code] || '', - } + text: langData.name, + value: langData['1'], + } : undefined; }) .filter(Boolean) as ListItem[]; @@ -70,7 +63,6 @@ const LangControl = (props: ControlProps) => { const renderItem = useCallback((item: ListItem) => { return ( );