From 85c53e93d0adf21f82badaa106553db6095b8dcb Mon Sep 17 00:00:00 2001 From: Martyanov Andrey <37772440+martyanovandrey@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:35:43 +0300 Subject: [PATCH] feat: stop using emoji icons for language (#218) --- src/components/Controls/Controls.scss | 2 +- .../Controls/single-controls/LangControl.tsx | 20 ++++--------------- 2 files changed, 5 insertions(+), 17 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..300b7bf8 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; @@ -59,7 +53,6 @@ const LangControl = (props: ControlProps) => { ? { text: langData.name, value: langData['1'], - icon: ICONS[code] || '', } : undefined; }) @@ -68,12 +61,7 @@ const LangControl = (props: ControlProps) => { return preparedLangs.length ? preparedLangs : LEGACY_LANG_ITEMS; }, [langs]); const renderItem = useCallback((item: ListItem) => { - return ( - - ); + return ; }, []); const onItemClick = useCallback( (item: ListItem) => {