Skip to content

Commit

Permalink
fix: typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Raubzeug committed Dec 25, 2024

Unverified

This user has not yet uploaded their public signing key.
1 parent 225f4c5 commit 6d6ed98
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/containers/App/Content.tsx
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ import type {SlotComponent} from '../../components/slots/types';
import routes from '../../routes';
import type {RootState} from '../../store';
import {authenticationApi} from '../../store/reducers/authentication/authentication';
import {useCapabilitiesQuery} from '../../store/reducers/capabilities/hooks';
import {useCapabilitiesLoaded, useCapabilitiesQuery} from '../../store/reducers/capabilities/hooks';
import {nodesListApi} from '../../store/reducers/nodesList';
import {cn} from '../../utils/cn';
import {lazyComponent} from '../../utils/lazyComponent';
@@ -199,10 +199,11 @@ function GetNodesList() {
}

function GetCapabilities({children}: {children: React.ReactNode}) {
const {isLoading} = useCapabilitiesQuery();
useCapabilitiesQuery();
const capabilitiesLoaded = useCapabilitiesLoaded();

return (
<LoaderWrapper loading={isLoading} size="l">
<LoaderWrapper loading={!capabilitiesLoaded} size="l">
{children}
</LoaderWrapper>
);
3 changes: 1 addition & 2 deletions src/store/reducers/capabilities/hooks.ts
Original file line number Diff line number Diff line change
@@ -15,8 +15,7 @@ function useDatabaseFromQuery() {
export function useCapabilitiesQuery() {
const database = useDatabaseFromQuery();

const result = capabilitiesApi.useGetClusterCapabilitiesQuery({database});
return result;
capabilitiesApi.useGetClusterCapabilitiesQuery({database});
}

export function useCapabilitiesLoaded() {

0 comments on commit 6d6ed98

Please sign in to comment.