Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/ui/src/builder/sidebar/BuilderSidebarComponentTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<div class="section__header">
<span class="section__title">{{ section.title }}</span>
<WdsButton
v-if="section.showAddButton"
variant="neutral"
size="smallIcon"
:data-automation-action="section.addAction"
Expand Down Expand Up @@ -120,6 +121,10 @@ const sharedBlueprintItems = computed(() => {
return allBlueprints.value.filter((c) => isSharedBlueprint(c));
});

const isSharedBlueprintsEnabled = computed(() =>
wf.featureFlags.value?.includes("shared_blueprints"),
);

const blueprintSections = computed(() => {
const sections = [
{
Expand All @@ -129,17 +134,19 @@ const blueprintSections = computed(() => {
addAction: "add-blueprint",
onAdd: addBlueprint,
emptyText: "No blueprints yet",
showAddButton: isSharedBlueprintsEnabled.value,
},
];

if (wf.featureFlags.value?.includes("shared_blueprints")) {
if (isSharedBlueprintsEnabled.value) {
sections.push({
key: "shared-blueprints",
title: "Shared Blueprints",
items: sharedBlueprintItems.value,
addAction: "add-shared-blueprint",
onAdd: addSharedBlueprint,
emptyText: "No shared blueprints yet",
showAddButton: true,
});
}

Expand Down
Loading