@@ -27,7 +27,7 @@ import {
27
27
} from '@mui/material' ;
28
28
import { useEffect , useState } from 'react' ;
29
29
import { ASSIGNED_SECRET_PLACEHOLDER , MCP_POLICY_NAME } from '../../Constants' ;
30
- import { useCatalogAll , useCatalogOperations } from '../../queries/useCatalog' ;
30
+ import { useCatalogOperations } from '../../queries/useCatalog' ;
31
31
import { useConfig } from '../../queries/useConfig' ;
32
32
import { useSecrets } from '../../queries/useSecrets' ;
33
33
import { CatalogItemRichened } from '../../types/catalog' ;
@@ -61,13 +61,15 @@ interface ConfigurationModalProps {
61
61
onClose : ( ) => void ;
62
62
catalogItem : CatalogItemRichened ;
63
63
client : v1 . DockerDesktopClient ;
64
+ registryLoading : boolean ;
64
65
}
65
66
66
67
const ConfigurationModal = ( {
67
68
open,
68
69
onClose,
69
70
catalogItem,
70
71
client,
72
+ registryLoading,
71
73
} : ConfigurationModalProps ) => {
72
74
const [ localSecrets , setLocalSecrets ] = useState <
73
75
{ [ key : string ] : string | undefined } | undefined
@@ -76,7 +78,6 @@ const ConfigurationModal = ({
76
78
77
79
const { isLoading : secretsLoading , mutate : mutateSecret } =
78
80
useSecrets ( client ) ;
79
- const { registryLoading } = useCatalogAll ( client ) ;
80
81
const { registerCatalogItem, unregisterCatalogItem } =
81
82
useCatalogOperations ( client ) ;
82
83
const { configLoading } = useConfig ( client ) ;
@@ -120,22 +121,8 @@ const ConfigurationModal = ({
120
121
( ! catalogItem . configSchema || catalogItem . configSchema . length === 0 ) &&
121
122
( ! catalogItem . secrets || catalogItem . secrets . length === 0 ) ;
122
123
123
- if ( secretsLoading || registryLoading || configLoading ) {
124
- return (
125
- < >
126
- < CircularProgress />
127
- < Typography > Loading registry...</ Typography >
128
- </ >
129
- ) ;
130
- }
131
-
132
- if ( ! localSecrets ) {
133
- return (
134
- < >
135
- < CircularProgress />
136
- < Typography > Loading secrets...</ Typography >
137
- </ >
138
- ) ;
124
+ if ( secretsLoading || registryLoading || configLoading || ! localSecrets ) {
125
+ return null ;
139
126
}
140
127
141
128
return (
0 commit comments