Skip to content

Commit a2cf07d

Browse files
author
raineer
committed
filtered navigation, feeds and codev overflow
1 parent af706c7 commit a2cf07d

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

‎apps/codebility/app/home/_components/LeftSidebar.tsx‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,30 @@ const LeftSidebar = () => {
4242
const fetchSidebarData = async () => {
4343
if (roleId) {
4444
const data = await getSidebarData(roleId);
45-
setSidebarData(data);
45+
46+
// Filter out unimplemented features
47+
const filteredData = data.map((section: SidebarSection) => ({
48+
...section,
49+
links: section.links.filter((link: SidebarLink) => {
50+
// TODO: Remove these filters when features are implemented
51+
52+
// Filter out Feeds from MENU section
53+
if (link.label === "Feeds") {
54+
console.log("🚧 Feeds feature not yet implemented - hiding from navigation");
55+
return false;
56+
}
57+
58+
// Filter out Codev Overflow from CODEVS section
59+
if (link.label === "Codev Overflow") {
60+
console.log("🚧 Codev Overflow feature not yet implemented - hiding from navigation");
61+
return false;
62+
}
63+
64+
return true; // Keep all other links
65+
})
66+
}));
67+
68+
setSidebarData(filteredData);
4669
}
4770
};
4871

@@ -219,8 +242,9 @@ const LeftSidebar = () => {
219242
</div>
220243
))}
221244
</nav>
245+
222246
</motion.aside>
223247
);
224248
};
225249

226-
export default memo(LeftSidebar);
250+
export default memo(LeftSidebar);

0 commit comments

Comments
 (0)