We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cfeae0 commit 2845b2fCopy full SHA for 2845b2f
frontend/src/components/Sidebar/useSidebarItems.ts
@@ -91,12 +91,16 @@ export const useSidebarItems = (sidebarName: string = DefaultSidebars.IN_CLUSTER
91
});
92
} else {
93
const entryGroup = entriesGroup.get(group)!;
94
- entryGroup.subList?.push({
95
- name: item.jsonData.metadata.name,
96
- label: item.jsonData.spec.names.kind,
97
- isCR: true,
98
- });
99
- //entryGroup.subList =
+ const subList = entryGroup.subList ?? (entryGroup.subList = []);
+ const crdName = item.jsonData.metadata.name;
+
+ if (!subList.some(subItem => subItem.name === crdName)) {
+ subList.push({
+ name: crdName,
100
+ label: item.jsonData.spec.names.kind,
101
+ isCR: true,
102
+ });
103
+ }
104
}
105
106
entriesGroup.forEach(item => {
0 commit comments