diff --git a/src/app/features/room-settings/RoomSettings.tsx b/src/app/features/room-settings/RoomSettings.tsx index d79cfd77..a2abde70 100644 --- a/src/app/features/room-settings/RoomSettings.tsx +++ b/src/app/features/room-settings/RoomSettings.tsx @@ -24,6 +24,7 @@ type RoomSettingsMenuItem = { page: RoomSettingsPage; name: string; icon: IconSrc; + activeIcon?: IconSrc; }; const useRoomSettingsMenuItems = (): RoomSettingsMenuItem[] => @@ -48,6 +49,7 @@ const useRoomSettingsMenuItems = (): RoomSettingsMenuItem[] => page: RoomSettingsPage.CosmeticsPage, name: 'Cosmetics', icon: Icons.Alphabet, + activeIcon: Icons.AlphabetUnderline, }, { page: RoomSettingsPage.EmojisStickersPage, @@ -139,29 +141,34 @@ export function RoomSettings({ initialPage, requestClose }: RoomSettingsProps) {
- {menuItems.map((item) => ( - - } - onClick={() => setActivePage(item.page)} - > - { + const currentIcon = + activePage === item.page && item.activeIcon ? item.activeIcon : item.icon; + + return ( + + } + onClick={() => setActivePage(item.page)} > - {item.name} - - - ))} + + {item.name} + + + ); + })}
diff --git a/src/app/features/space-settings/SpaceSettings.tsx b/src/app/features/space-settings/SpaceSettings.tsx index 79ab8442..ddd1d5c7 100644 --- a/src/app/features/space-settings/SpaceSettings.tsx +++ b/src/app/features/space-settings/SpaceSettings.tsx @@ -23,6 +23,7 @@ type SpaceSettingsMenuItem = { page: SpaceSettingsPage; name: string; icon: IconSrc; + activeIcon?: IconSrc; }; const useSpaceSettingsMenuItems = (): SpaceSettingsMenuItem[] => @@ -47,6 +48,7 @@ const useSpaceSettingsMenuItems = (): SpaceSettingsMenuItem[] => page: SpaceSettingsPage.CosmeticsPage, name: 'Cosmetics', icon: Icons.Alphabet, + activeIcon: Icons.AlphabetUnderline, }, { page: SpaceSettingsPage.EmojisStickersPage, @@ -132,26 +134,34 @@ export function SpaceSettings({ initialPage, requestClose }: SpaceSettingsProps)
- {menuItems.map((item) => ( - } - onClick={() => setActivePage(item.page)} - > - { + const currentIcon = + activePage === item.page && item.activeIcon ? item.activeIcon : item.icon; + + return ( + + } + onClick={() => setActivePage(item.page)} > - {item.name} - - - ))} + + {item.name} + + + ); + })}