Files
frontend-app-learning/src/courseware/course/sidebar/Sidebar.jsx
Awais Ansari 0664dc38d9 feat: decouple notifications panel using widget registry mechanism (#1885)
Removes the tightly coupled upgrade/upsell ("notifications") panel from the Learning MFE core and replaces it with a pluggable widget registry system. The right sidebar now supports dynamically-registered external widgets, making it easy to add, remove, or replace sidebar panels without forking the MFE.
2026-04-08 20:03:55 -03:00

20 lines
395 B
JavaScript

import { useContext } from 'react';
import SidebarContext from './SidebarContext';
const Sidebar = () => {
const { currentSidebar, SIDEBARS } = useContext(SidebarContext);
if (!currentSidebar || !SIDEBARS || !SIDEBARS[currentSidebar]) {
return null;
}
const SidebarToRender = SIDEBARS[currentSidebar].Sidebar;
return (
<SidebarToRender />
);
};
export default Sidebar;