This replaces all occurences of "CreateImageWizardV2" with just "CreateImageWizard" as it is the only version now.
8 lines
375 B
TypeScript
8 lines
375 B
TypeScript
import { useAppSelector } from '../../../store/hooks';
|
|
import { ImageTypes } from '../../../store/imageBuilderApi';
|
|
import { selectImageTypes } from '../../../store/wizardSlice';
|
|
|
|
export const useHasSpecificTargetOnly = (target: ImageTypes) => {
|
|
const environments = useAppSelector(selectImageTypes);
|
|
return environments.length === 1 && environments.includes(target);
|
|
};
|