Skip to content

Commit

Permalink
fix: small fixes (#1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
devsargam authored Dec 6, 2024
1 parent 99dd0fa commit afd9bbd
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ export function Sidebar({
/>
)}
</div>
</Link>
)
</div>
</Link>
);
});
},
Expand Down Expand Up @@ -271,7 +271,7 @@ export function Sidebar({
<Accordion
type="multiple"
defaultValue={currentActiveContentIds.map((num) => `item-${num}`)}
className="w-full px-4 capitalize pb-24"
className="w-full px-4 pb-24 capitalize"
>
{memoizedContent}
</Accordion>
Expand Down Expand Up @@ -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
);
}
}

0 comments on commit afd9bbd

Please sign in to comment.