File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 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';
1212import routes from '../../routes' ;
1313import type { RootState } from '../../store' ;
1414import { authenticationApi } from '../../store/reducers/authentication/authentication' ;
15- import { useCapabilitiesQuery } from '../../store/reducers/capabilities/hooks' ;
15+ import { useCapabilitiesLoaded , useCapabilitiesQuery } from '../../store/reducers/capabilities/hooks' ;
1616import { nodesListApi } from '../../store/reducers/nodesList' ;
1717import { cn } from '../../utils/cn' ;
1818import { lazyComponent } from '../../utils/lazyComponent' ;
@@ -178,8 +178,7 @@ function DataWrapper({children}: {children: React.ReactNode}) {
178178 return (
179179 < GetUser >
180180 < GetNodesList />
181- < GetCapabilities />
182- { children }
181+ < GetCapabilities > { children } </ GetCapabilities >
183182 </ GetUser >
184183 ) ;
185184}
@@ -199,9 +198,15 @@ function GetNodesList() {
199198 return null ;
200199}
201200
202- function GetCapabilities ( ) {
201+ function GetCapabilities ( { children } : { children : React . ReactNode } ) {
203202 useCapabilitiesQuery ( ) ;
204- return null ;
203+ const capabilitiesLoaded = useCapabilitiesLoaded ( ) ;
204+
205+ return (
206+ < LoaderWrapper loading = { ! capabilitiesLoaded } size = "l" >
207+ { children }
208+ </ LoaderWrapper >
209+ ) ;
205210}
206211
207212interface ContentWrapperProps {
You can’t perform that action at this time.
0 commit comments