File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import type {SlotComponent} from '../../components/slots/types';
12
12
import routes from '../../routes' ;
13
13
import type { RootState } from '../../store' ;
14
14
import { authenticationApi } from '../../store/reducers/authentication/authentication' ;
15
- import { useCapabilitiesQuery } from '../../store/reducers/capabilities/hooks' ;
15
+ import { useCapabilitiesLoaded , useCapabilitiesQuery } from '../../store/reducers/capabilities/hooks' ;
16
16
import { nodesListApi } from '../../store/reducers/nodesList' ;
17
17
import { cn } from '../../utils/cn' ;
18
18
import { lazyComponent } from '../../utils/lazyComponent' ;
@@ -178,8 +178,7 @@ function DataWrapper({children}: {children: React.ReactNode}) {
178
178
return (
179
179
< GetUser >
180
180
< GetNodesList />
181
- < GetCapabilities />
182
- { children }
181
+ < GetCapabilities > { children } </ GetCapabilities >
183
182
</ GetUser >
184
183
) ;
185
184
}
@@ -199,9 +198,15 @@ function GetNodesList() {
199
198
return null ;
200
199
}
201
200
202
- function GetCapabilities ( ) {
201
+ function GetCapabilities ( { children } : { children : React . ReactNode } ) {
203
202
useCapabilitiesQuery ( ) ;
204
- return null ;
203
+ const capabilitiesLoaded = useCapabilitiesLoaded ( ) ;
204
+
205
+ return (
206
+ < LoaderWrapper loading = { ! capabilitiesLoaded } size = "l" >
207
+ { children }
208
+ </ LoaderWrapper >
209
+ ) ;
205
210
}
206
211
207
212
interface ContentWrapperProps {
You can’t perform that action at this time.
0 commit comments