Skip to content

Commit

Permalink
Merge pull request #1310 from sgratch/fix_k8s_api_status_handing_in_s…
Browse files Browse the repository at this point in the history
…tandardPage

🐞 Fix k8s API's statuses handing in StandardPage component for retrieving resources
  • Loading branch information
yaacov authored Aug 22, 2024
2 parents 98773d6 + 3181677 commit 5a496fa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export function StandardPage<T>({
[filteredData, currentPage, itemsPerPage],
);

const errorFetchingData = loaded && error;
const errorFetchingData = error;
const noResults = loaded && !error && sortedData.length == 0;
const noMatchingResults = loaded && !error && filteredData.length === 0 && sortedData.length > 0;

Expand Down Expand Up @@ -444,7 +444,7 @@ export function StandardPage<T>({
toId={toId}
expandedIds={expandedIds}
>
{!loaded && <Loading key="loading" title={t('Loading')} />}
{!loaded && !error && <Loading key="loading" title={t('Loading')} />}
{errorFetchingData && <ErrorState key="error" title={t('Unable to retrieve data')} />}
{noResults &&
(customNoResultsFound ?? (
Expand Down

0 comments on commit 5a496fa

Please sign in to comment.