Skip to content

Commit

Permalink
fix: list props
Browse files Browse the repository at this point in the history
  • Loading branch information
OliwiaGowor committed Nov 18, 2024
1 parent 5d46efb commit 70eb30d
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/shared/components/ResourcesList/ResourcesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@ export function ResourcesList({
return <></>; // wait for the context update
}

const allProps = {
customHeaderActions,
resourceUrl,
resourceType,
resourceTitle,
isCompact,
description,
layoutNumber,
resources,
filterFn,
...props,
};

const content = (
<>
<BannerCarousel
Expand All @@ -106,10 +119,10 @@ export function ResourcesList({
{resources ? (
<ResourceListRenderer
resources={(resources || []).filter(filterFn)}
{...props}
{...allProps}
/>
) : (
<Resources {...props} />
<Resources {...allProps} />
)}
</>
);
Expand Down Expand Up @@ -169,9 +182,9 @@ function Resources(props) {
<ResourceListRenderer
loading={loading}
error={error}
resources={filter ? (resources || []).filter(filter) : resources || []}
silentRefetch={silentRefetch}
{...props}
resources={filter ? (resources || []).filter(filter) : resources || []}
/>
);
}
Expand Down

0 comments on commit 70eb30d

Please sign in to comment.