1
+ import type { ComponentProps , FC } from 'react' ;
1
2
import EmptyIcon from '@mui/icons-material/CheckBoxOutlineBlankOutlined' ;
2
3
import type SvgIcon from '@mui/material/SvgIcon/SvgIcon' ;
3
4
import ApplicationsIcon from '@mui/icons-material/AppsOutlined' ;
@@ -29,10 +30,14 @@ import GitHubIcon from '@mui/icons-material/GitHub';
29
30
import LibraryBooksIcon from '@mui/icons-material/LibraryBooks' ;
30
31
import FactCheckOutlinedIcon from '@mui/icons-material/FactCheckOutlined' ;
31
32
import PersonalDashboardIcon from '@mui/icons-material/DashboardOutlined' ;
32
- import type { FC } from 'react' ;
33
+ import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon' ;
34
+ import PlaygroundIcon from '@mui/icons-material/AutoFixNormal' ;
33
35
34
36
// TODO: move to routes
35
- const icons : Record < string , typeof SvgIcon > = {
37
+ const icons : Record <
38
+ string ,
39
+ typeof SvgIcon | FC < ComponentProps < typeof SvgIcon > >
40
+ > = {
36
41
'/search' : SearchIcon ,
37
42
'/applications' : ApplicationsIcon ,
38
43
'/context' : ContextFieldsIcon ,
@@ -60,6 +65,8 @@ const icons: Record<string, typeof SvgIcon> = {
60
65
'/history' : EventLogIcon ,
61
66
'/release-templates' : FactCheckOutlinedIcon ,
62
67
'/personal' : PersonalDashboardIcon ,
68
+ '/projects' : ProjectIcon ,
69
+ '/playground' : PlaygroundIcon ,
63
70
GitHub : GitHubIcon ,
64
71
Documentation : LibraryBooksIcon ,
65
72
} ;
@@ -69,7 +76,6 @@ const findIcon = (key: string) => {
69
76
} ;
70
77
71
78
export const IconRenderer : FC < { path : string } > = ( { path } ) => {
72
- const IconComponent = findIcon ( path ) ; // Fallback to 'default' if the type is not found
73
-
79
+ const IconComponent = findIcon ( path ) ;
74
80
return < IconComponent /> ;
75
81
} ;
0 commit comments