From 06971375cb6ca1ec5f9126fcf04878b9753da106 Mon Sep 17 00:00:00 2001 From: David Leek Date: Wed, 3 Jul 2024 09:41:12 +0200 Subject: [PATCH] chore: fix command bar missing icons in quick suggestions (#7522) --- .../RecentlyVisited/CommandResultGroup.tsx | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/component/commandBar/RecentlyVisited/CommandResultGroup.tsx b/frontend/src/component/commandBar/RecentlyVisited/CommandResultGroup.tsx index 67c64f4c12..7580129020 100644 --- a/frontend/src/component/commandBar/RecentlyVisited/CommandResultGroup.tsx +++ b/frontend/src/component/commandBar/RecentlyVisited/CommandResultGroup.tsx @@ -14,6 +14,8 @@ import { IconRenderer, StyledProjectIcon, } from 'component/layout/MainLayout/NavigationSidebar/IconRenderer'; +import InsightsIcon from '@mui/icons-material/Insights'; +import PlaygroundIcon from '@mui/icons-material/AutoFixNormal'; import { TooltipResolver } from 'component/common/TooltipResolver/TooltipResolver'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; import useProjectOverview from 'hooks/api/getters/useProjectOverview/useProjectOverview'; @@ -48,6 +50,20 @@ export interface CommandResultGroupItem { description?: string | null; } +const ButtonItemIcon = ({ path }: { path: string }) => { + if (path === '/projects') { + return ; + } + if (path === '/playground') { + return ; + } + if (path === '/insights') { + return ; + } + + return ; +}; + export const RecentlyVisitedPathButton = ({ path, key, @@ -76,11 +92,7 @@ export const RecentlyVisitedPathButton = ({ onClick={onClick} > - } - elseShow={} - /> +