From 9ba6722bffe65dee83bc65c6d39f8f2f87cc550b Mon Sep 17 00:00:00 2001 From: symonbaikov Date: Fri, 6 Jun 2025 14:56:20 +0300 Subject: [PATCH] refactor: simplify flag rendering in AccountPane - Removed unnecessary locale flag styles and updated flag rendering logic - Changed flag representation to use a simpler structure with country code and name --- .../AccountPane/AccountPane.jsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/client/src/components/users/UserSettingsModal/AccountPane/AccountPane.jsx b/client/src/components/users/UserSettingsModal/AccountPane/AccountPane.jsx index 3eca459c..2997a218 100644 --- a/client/src/components/users/UserSettingsModal/AccountPane/AccountPane.jsx +++ b/client/src/components/users/UserSettingsModal/AccountPane/AccountPane.jsx @@ -21,7 +21,6 @@ import selectors from '../../../../selectors'; import entryActions from '../../../../entry-actions'; import styles from './AccountPane.module.scss'; -import localeFlagStyles from '../LocaleFlag.module.scss'; const AccountPane = React.memo(() => { const user = useSelector(selectors.selectCurrentUser); @@ -71,21 +70,8 @@ const AccountPane = React.memo(() => { }, ...locales.map((locale) => ({ value: locale.language, - text: ( - <> - {locale.country && ( - - {locale.country} - - )} - {locale.name} - - ), + flag: locale.country, + text: locale.name, })), ]} value={user.language || 'auto'}