diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index eb6bd9824..616a998c9 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -34,6 +34,24 @@ const sidebarVariants = { }, }; +const ConditionalFilterContent = React.forwardRef< + HTMLDivElement, + React.HTMLProps +>(({ className }, ref) => { + const pathName = usePathname(); + const isVideoPlayerPage = pathName.startsWith('/video/'); + + if (isVideoPlayerPage) return null; + + return ( + } + /> + ); +}); +ConditionalFilterContent.displayName = 'ConditionalFilterContent'; + export function Sidebar({ courseId, fullCourseContent, @@ -42,6 +60,7 @@ export function Sidebar({ courseId: string; }) { const pathName = usePathname(); + const isVideoPlayerPage = pathName.startsWith('/video/'); const [sidebarOpen, setSidebarOpen] = useRecoilState(sidebarOpenAtom); const [currentActiveContentIds, setCurrentActiveContentIds] = useState< number[] @@ -257,10 +276,11 @@ export function Sidebar({

Course Content

- +