File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/extension/ui/src/components/tile Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ import {
25
25
Typography ,
26
26
useTheme ,
27
27
} from '@mui/material' ;
28
+ import { capitalize } from 'lodash-es' ;
28
29
import { useEffect , useState } from 'react' ;
30
+
29
31
import { ASSIGNED_SECRET_PLACEHOLDER , MCP_POLICY_NAME } from '../../Constants' ;
30
32
import { useCatalogOperations } from '../../queries/useCatalog' ;
31
33
import { useConfig } from '../../queries/useConfig' ;
@@ -152,7 +154,15 @@ const ConfigurationModal = ({
152
154
borderRadius : 1 ,
153
155
} }
154
156
/>
155
- { catalogItem . name }
157
+ {
158
+ // Lodash doesn't have a capitalize function that works with strings
159
+ catalogItem . name
160
+ . replace ( / - / g, ' ' )
161
+ . replace ( / _ / g, ' ' )
162
+ . split ( ' ' )
163
+ . map ( capitalize )
164
+ . join ( ' ' )
165
+ }
156
166
157
167
< Tooltip
158
168
placement = "right"
You can’t perform that action at this time.
0 commit comments