V2Wizard: Add "Look under included" empty state
This adds a new empty state to the "Other toggle" for "Selected" packages which will inform user, that their added packages are under "Included repos".
This commit is contained in:
parent
02ca8140c4
commit
8dd9d32475
1 changed files with 33 additions and 0 deletions
|
|
@ -257,6 +257,35 @@ const Packages = () => {
|
|||
);
|
||||
};
|
||||
|
||||
const TryLookingUnderIncluded = () => {
|
||||
return (
|
||||
<Tr>
|
||||
<Td colSpan={5}>
|
||||
<Bullseye>
|
||||
<EmptyState variant={EmptyStateVariant.sm}>
|
||||
<EmptyStateHeader
|
||||
titleText="No selected packages"
|
||||
headingLevel="h4"
|
||||
/>
|
||||
<EmptyStateBody>
|
||||
There are no selected packages in Other repos. Try looking under
|
||||
"
|
||||
<Button
|
||||
variant="link"
|
||||
onClick={() => setToggleSourceRepos('toggle-included-repos')}
|
||||
isInline
|
||||
>
|
||||
Included repos
|
||||
</Button>
|
||||
".
|
||||
</EmptyStateBody>
|
||||
</EmptyState>
|
||||
</Bullseye>
|
||||
</Td>
|
||||
</Tr>
|
||||
);
|
||||
};
|
||||
|
||||
const NoResultsFound = () => {
|
||||
const { isBeta } = useGetEnvironment();
|
||||
return (
|
||||
|
|
@ -825,6 +854,10 @@ const Packages = () => {
|
|||
isSuccessRecommendedPackages &&
|
||||
transformedPackages.length === 0 &&
|
||||
toggleSelected === 'toggle-available' && <NoResultsFound />}
|
||||
{searchTerm &&
|
||||
toggleSelected === 'toggle-selected' &&
|
||||
toggleSourceRepos === 'toggle-other-repos' &&
|
||||
packages.length > 0 && <TryLookingUnderIncluded />}
|
||||
{searchTerm &&
|
||||
transformedPackages.length >= 100 &&
|
||||
handleExactMatch()}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue