import React from 'react'; import { ListView } from 'patternfly-react'; import { sprintf } from 'foremanReact/common/I18n'; import Pagination from 'foremanReact/components/Pagination/PaginationWrapper'; import RepositorySet from './components/RepositorySet'; import EnabledRepository from './components/EnabledRepository'; export const getSetsComponent = (repoSetsState, onPaginationChange) => { const { results, searchIsActive, pagination, itemCount, } = repoSetsState; if (itemCount === 0) { if (searchIsActive) { return

{__('No repository sets match your search criteria.')}

; } const noProductsMessage = sprintf( __('No Red Hat products currently exist, please import a manifest %(anchorBegin)s here %(anchorEnd)s to receive Red Hat content. No repository sets available.'), { anchorBegin: '', anchorEnd: '', }, ); // eslint-disable-next-line react/no-danger return

; } return (

{results.map(set => )} ); }; export const getEnabledComponent = (enabledReposState, onPaginationChange) => { const { repositories, searchIsActive, pagination, itemCount, } = enabledReposState; if (itemCount === 0) { if (searchIsActive) { return

{__('No enabled repositories match your search criteria.')}

; } return

{__('No repositories enabled.')}

; } return (
{repositories.map(repo => )}
); };