@@ -23,7 +23,12 @@ const PgSidebar = () => {
23
23
const [ selectedCategory , setSelectedCategory ] = useState < IQueryTemplateData | null > ( null ) ;
24
24
const [ modalIsOpen , setModalIsOpen ] = useState ( false ) ;
25
25
26
- const basePath = useBasePath ;
26
+ const moveIconPath = useBasePath ( "/icons/move.svg" ) ;
27
+ const arrowRightSlimPath = useBasePath ( "/icons/arrow-right-slim.svg" ) ;
28
+ const refreshIconPath = useBasePath ( "/icons/refresh.svg" ) ;
29
+ const profilerIconPath = useBasePath ( "/icons/profiler.svg" ) ;
30
+ const universityIconPath = useBasePath ( "/icons/university.svg" ) ;
31
+ const cloudIconPath = useBasePath ( "/icons/cloud-midnight.svg" ) ;
27
32
28
33
useEffect ( ( ) => {
29
34
if ( selectedQuery ) {
@@ -46,17 +51,17 @@ const PgSidebar = () => {
46
51
{
47
52
label : "Docs" ,
48
53
url : "https://redis.io/docs/latest/" ,
49
- image : basePath ( "/icons/profiler.svg" )
54
+ image : profilerIconPath
50
55
} ,
51
56
{
52
57
label : "Redis University" ,
53
58
url : "https://university.redis.io/" ,
54
- image : basePath ( "/icons/university.svg" )
59
+ image : universityIconPath
55
60
} ,
56
61
{
57
62
label : "Redis Cloud" ,
58
63
url : "https://cloud.redis.io/" ,
59
- image : basePath ( "/icons/cloud-midnight.svg" )
64
+ image : cloudIconPath
60
65
} ,
61
66
]
62
67
@@ -68,7 +73,7 @@ const PgSidebar = () => {
68
73
</ div >
69
74
< div className = "pg-list-item anime-line-hover" onClick = { ( ) => setModalIsOpen ( true ) } >
70
75
< div className = "pg-list-item-icon" >
71
- < ImageIcon imgSrc = { basePath ( "/icons/move.svg" ) } alt = "move" imgWidth = "1rem" imgHeight = "1rem" />
76
+ < ImageIcon imgSrc = { moveIconPath } alt = "move" imgWidth = "1rem" imgHeight = "1rem" />
72
77
</ div >
73
78
< div className = "pg-list-item-label select-query-label" >
74
79
{ labels . selectQuery }
@@ -89,7 +94,7 @@ const PgSidebar = () => {
89
94
onClick = { ( ) => handleQueryItemClick ( item . queryId , selectedCategory ?. categoryId ) } >
90
95
91
96
< div className = "pg-list-item-icon" >
92
- < ImageIcon imgSrc = { basePath ( "/icons/arrow-right-slim.svg" ) } alt = { item . label } imgWidth = "1rem" imgHeight = "1rem" />
97
+ < ImageIcon imgSrc = { arrowRightSlimPath } alt = { item . label } imgWidth = "1rem" imgHeight = "1rem" />
93
98
</ div >
94
99
< div className = "pg-list-item-label" >
95
100
{ item . label }
@@ -120,7 +125,7 @@ const PgSidebar = () => {
120
125
121
126
< div className = "pg-list-item anime-line-hover" key = "replay-tour" onClick = { handleReplayTourClick } >
122
127
< div className = "pg-list-item-icon" >
123
- < ImageIcon imgSrc = { basePath ( "/icons/refresh.svg" ) } alt = "rotate" imgWidth = "1rem" imgHeight = "1rem" />
128
+ < ImageIcon imgSrc = { refreshIconPath } alt = "rotate" imgWidth = "1rem" imgHeight = "1rem" />
124
129
</ div >
125
130
< div className = "pg-list-item-label pg-replay-tour-lbl" >
126
131
{ labels . replayTour }
0 commit comments