From 1959fcd437c65edb1de2e66d077780b55df4e3c7 Mon Sep 17 00:00:00 2001 From: Radiquum Date: Thu, 27 Mar 2025 20:54:43 +0500 Subject: [PATCH] refactor: remove 'show only link names in navbar' in settings on mobile --- app/components/Navbar/NavbarUpdate.tsx | 2 +- .../SettingsModal/SettingsModal.tsx | 37 ++++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/app/components/Navbar/NavbarUpdate.tsx b/app/components/Navbar/NavbarUpdate.tsx index 71b74d0..4d0927d 100644 --- a/app/components/Navbar/NavbarUpdate.tsx +++ b/app/components/Navbar/NavbarUpdate.tsx @@ -87,7 +87,7 @@ export const Navbar = () => { return ( <>
-
+
{menuItems.map((item) => { return ( diff --git a/app/components/SettingsModal/SettingsModal.tsx b/app/components/SettingsModal/SettingsModal.tsx index 5c10bc1..d9d4378 100644 --- a/app/components/SettingsModal/SettingsModal.tsx +++ b/app/components/SettingsModal/SettingsModal.tsx @@ -33,7 +33,7 @@ const NavbarTitles = { links: "Только ссылки", selected: "Только выбранные", never: "Никогда", -} +}; export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => { const preferenceStore = usePreferencesStore(); @@ -169,24 +169,25 @@ export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => {

- {Object.keys(NavbarTitles).map((key: "always" | "links" | "selected" | "never") => { - return ( - - preferenceStore.setFlags({ - showNavbarTitles: key, - }) - } - > - {NavbarTitles[key]} - - ); - })} + {Object.keys(NavbarTitles).map( + (key: "always" | "links" | "selected" | "never") => { + return ( + + preferenceStore.setFlags({ + showNavbarTitles: key, + }) + } + > + {NavbarTitles[key]} + + ); + } + )}