Skip to content

Commit

Permalink
Merge pull request #1728 from Vinit1014/feature/displayMsg
Browse files Browse the repository at this point in the history
Added appropriate message for filter #1725
  • Loading branch information
devsargam authored Jan 29, 2025
2 parents 27e1649 + 8f793a3 commit a7ed763
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/components/FolderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ export const FolderView = ({
currentfilter,
);

if (filteredCourseContent?.length === 0) {
const filterMessages = {
watched: "You haven't completed any content in this section yet.",
watching: "No content currently in progress.",
unwatched: "No new content available to watch.",
all: "No content available in this section.",
};

return (
<div className="mt-56 flex">
<div className="m-auto text-center text-gray-500 text-xl">
{filterMessages[currentfilter] || "No content found."}
</div>
</div>
);
}

return (
<div>
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
Expand Down

0 comments on commit a7ed763

Please sign in to comment.