store/backendApi: create a useBackendPrefetch hook
Create a helper hook for RTK prefetch queries. This wrapper function is needed since the imagebuilderApi and cockpitApi aren't at parity yet.
This commit is contained in:
parent
5a70e31d5a
commit
6e9bd89b08
3 changed files with 8 additions and 7 deletions
|
|
@ -24,8 +24,8 @@ import {
|
|||
CREATING_IMAGES_WITH_IB_SERVICE_URL,
|
||||
OSBUILD_SERVICE_ARCHITECTURE_URL,
|
||||
} from '../../constants';
|
||||
import { useBackendPrefetch } from '../../store/backendApi';
|
||||
import { useAppSelector } from '../../store/hooks';
|
||||
import { imageBuilderApi } from '../../store/imageBuilderApi';
|
||||
import { selectDistribution } from '../../store/wizardSlice';
|
||||
import { resolveRelPath } from '../../Utilities/path';
|
||||
import './ImageBuilderHeader.scss';
|
||||
|
|
@ -99,7 +99,7 @@ export const ImageBuilderHeader = ({
|
|||
const navigate = useNavigate();
|
||||
|
||||
const distribution = useAppSelector(selectDistribution);
|
||||
const prefetchTargets = imageBuilderApi.usePrefetch('getArchitectures');
|
||||
const prefetchTargets = useBackendPrefetch('getArchitectures');
|
||||
|
||||
const importExportFlag = useFlagWithEphemDefault(
|
||||
'image-builder.import.enabled'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue