Skip to content

Commit

Permalink
bugfix(home): fixed home page break due to my business applications
Browse files Browse the repository at this point in the history
  • Loading branch information
lavanya-bmw authored and evegufy committed Nov 30, 2023
1 parent 55b4110 commit e4d96a8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default function BusinessApplicationsSection() {
const { t } = useTranslation()
const { data } = useFetchBusinessAppsQuery()
const reference = PageService.registerReference(label, useRef(null))
const businessAppsData = data?.filter((val, index) => index < 4)

return (
<div ref={reference} className="orange-background">
Expand All @@ -78,7 +79,7 @@ export default function BusinessApplicationsSection() {
</Typography>

<Carousel gapToDots={5}>
{data
{businessAppsData
?.map((app: AppMarketplaceApp) => {
const card = appToCard(app)
return card
Expand All @@ -97,8 +98,8 @@ export default function BusinessApplicationsSection() {
imageLoader={fetchImageWithToken}
/>
))}
{data &&
new Array(4 - data.length)
{businessAppsData &&
new Array(4 - businessAppsData.length)
.fill(true)
.map((_item, i) => (
<EmptyBox key={i} text={t('content.home.emptyCards.title')} />
Expand Down

0 comments on commit e4d96a8

Please sign in to comment.