Wizard: Prefetch the list of activation keys on Image output step
This prefetches the list of activation keys upon entering the Wizard, making the loading times on the Registration step better for the user.
This commit is contained in:
parent
4637a2a5d8
commit
b8c852c836
1 changed files with 7 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import {
|
||||
Button,
|
||||
|
|
@ -20,6 +20,7 @@ import {
|
|||
useGetArchitecturesQuery,
|
||||
} from '../../../../store/imageBuilderApi';
|
||||
import { provisioningApi } from '../../../../store/provisioningApi';
|
||||
import { rhsmApi } from '../../../../store/rhsmApi';
|
||||
import {
|
||||
addImageType,
|
||||
reinitializeAws,
|
||||
|
|
@ -49,6 +50,11 @@ const TargetEnvironment = () => {
|
|||
|
||||
const dispatch = useAppDispatch();
|
||||
const prefetchSources = provisioningApi.usePrefetch('getSourceList');
|
||||
const prefetchActivationKeys = rhsmApi.usePrefetch('listActivationKeys');
|
||||
|
||||
useEffect(() => {
|
||||
prefetchActivationKeys();
|
||||
}, []);
|
||||
|
||||
const supportedEnvironments = data?.find(
|
||||
(elem) => elem.arch === arch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue