From afd9bbd5ef7e0e9b5a970ee9a6eaa086d65ce34e Mon Sep 17 00:00:00 2001 From: Sargam Date: Sat, 7 Dec 2024 01:37:46 +0530 Subject: [PATCH] fix: small fixes (#1618) --- src/components/Sidebar.tsx | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 545305b5..d3bf61eb 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -217,8 +217,8 @@ export function Sidebar({ /> )} - - ) + + ); }); }, @@ -271,7 +271,7 @@ export function Sidebar({ `item-${num}`)} - className="w-full px-4 capitalize pb-24" + className="w-full px-4 pb-24 capitalize" > {memoizedContent} @@ -307,25 +307,3 @@ function Check({ content }: { content: any }) { /> ); } - -function filterContent(filter: string, content: FullCourseContent) { - if (filter === 'all' || filter === '') { - return true; - } - if (filter === 'watched') { - return content.videoProgress?.markAsCompleted; - } - if (filter === 'watching') { - return ( - content.videoProgress?.markAsCompleted === false && - content.videoProgress?.duration !== null && - content.videoProgress?.duration !== 0 - ); - } - if (filter === 'unwatched') { - return ( - content.videoProgress?.markAsCompleted === false && - content.videoProgress?.duration === 0 - ); - } -}