diff --git a/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js b/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js index 9cf372626..7bda951b1 100644 --- a/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js +++ b/webpack/JobWizard/steps/HostsAndInputs/HostPreviewModal.js @@ -4,16 +4,18 @@ import { useSelector } from 'react-redux'; import URI from 'urijs'; import { List, ListItem, Modal, Button } from '@patternfly/react-core'; import { translate as __, sprintf } from 'foremanReact/common/I18n'; -import { foremanUrl } from 'foremanReact/common/helpers'; -import { HOSTS_PATH } from 'foremanReact/routes/Hosts/constants'; +import { + useForemanHostsPageUrl, + useForemanHostDetailsPageUrl, +} from 'foremanReact/Root/Context/ForemanContext'; import { selectHosts, selectHostCount } from '../../JobWizardSelectors'; import { HOSTS_TO_PREVIEW_AMOUNT } from '../../JobWizardConstants'; export const HostPreviewModal = ({ isOpen, setIsOpen, searchQuery }) => { const hosts = useSelector(selectHosts); const hostsCount = useSelector(selectHostCount); - const url = new URI(foremanUrl('/hosts')); - + const hostsUrl = new URI(useForemanHostsPageUrl()); + const hostUrl = useForemanHostDetailsPageUrl(); return ( {