Skip to content

Commit a7ed763

Browse files
authored
Merge pull request #1728 from Vinit1014/feature/displayMsg
Added appropriate message for filter #1725
2 parents 27e1649 + 8f793a3 commit a7ed763

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/components/FolderView.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ export const FolderView = ({
3636
currentfilter,
3737
);
3838

39+
if (filteredCourseContent?.length === 0) {
40+
const filterMessages = {
41+
watched: "You haven't completed any content in this section yet.",
42+
watching: "No content currently in progress.",
43+
unwatched: "No new content available to watch.",
44+
all: "No content available in this section.",
45+
};
46+
47+
return (
48+
<div className="mt-56 flex">
49+
<div className="m-auto text-center text-gray-500 text-xl">
50+
{filterMessages[currentfilter] || "No content found."}
51+
</div>
52+
</div>
53+
);
54+
}
55+
3956
return (
4057
<div>
4158
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">

0 commit comments

Comments
 (0)