From e436ef29f1c80176ef92b8c6caf315a882ac1b74 Mon Sep 17 00:00:00 2001 From: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> Date: Wed, 2 Apr 2025 15:31:55 +0200 Subject: [PATCH] fix: add Project and Playground icons for command bar (#9677) Updating `IconRenderer` component in the `NavigationSidebar`. It will fix icons not showing up for command bar search results. --- .../MainLayout/NavigationSidebar/IconRenderer.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx index 24ae9256c9..cf0a896cec 100644 --- a/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx +++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/IconRenderer.tsx @@ -1,3 +1,4 @@ +import type { ComponentProps, FC } from 'react'; import EmptyIcon from '@mui/icons-material/CheckBoxOutlineBlankOutlined'; import type SvgIcon from '@mui/material/SvgIcon/SvgIcon'; import ApplicationsIcon from '@mui/icons-material/AppsOutlined'; @@ -29,10 +30,14 @@ import GitHubIcon from '@mui/icons-material/GitHub'; import LibraryBooksIcon from '@mui/icons-material/LibraryBooks'; import FactCheckOutlinedIcon from '@mui/icons-material/FactCheckOutlined'; import PersonalDashboardIcon from '@mui/icons-material/DashboardOutlined'; -import type { FC } from 'react'; +import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon'; +import PlaygroundIcon from '@mui/icons-material/AutoFixNormal'; // TODO: move to routes -const icons: Record = { +const icons: Record< + string, + typeof SvgIcon | FC> +> = { '/search': SearchIcon, '/applications': ApplicationsIcon, '/context': ContextFieldsIcon, @@ -60,6 +65,8 @@ const icons: Record = { '/history': EventLogIcon, '/release-templates': FactCheckOutlinedIcon, '/personal': PersonalDashboardIcon, + '/projects': ProjectIcon, + '/playground': PlaygroundIcon, GitHub: GitHubIcon, Documentation: LibraryBooksIcon, };