Skip to content

Commit 7f7fc0d

Browse files
committed
feat(aurora): add serviceBanner slot
1 parent 5958242 commit 7f7fc0d

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

packages/aurora/src/client/components/ContentHeader/ContentHeader.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ export function ContentHeader({ title, projectId, description, actions, badges }
2626
// Distinguish them by the $provider param.
2727
const currentService = routeService === "containers" && provider === "ceph" ? "ceph-containers" : routeService
2828

29-
const slotActions = slots?.servicePageActions ? (
30-
<Slot component={slots.servicePageActions} useShadowDOM={false} currentService={currentService} />
31-
) : null
29+
const slotActions =
30+
slots?.servicePageActions && currentService ? (
31+
<Slot component={slots.servicePageActions} useShadowDOM={false} currentService={currentService} />
32+
) : null
3233

33-
const serviceBanner = slots?.serviceBanner ? (
34-
<Slot component={slots.serviceBanner} useShadowDOM={false} currentService={currentService} />
35-
) : null
34+
const serviceBanner =
35+
slots?.serviceBanner && currentService ? (
36+
<Slot component={slots.serviceBanner} useShadowDOM={false} currentService={currentService} />
37+
) : null
3638

3739
return (
3840
<header className="mb-8">

0 commit comments

Comments
 (0)