Skip to content

Commit

Permalink
feat: Add no results for quizzes
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatkashyap committed Jan 11, 2024
1 parent b416fd4 commit aea31f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@ function displayQuizCards(quizzes) {
quizzesContainer.innerHTML = "";
let row;
if (!quizzes.length) {
let noResults = document.createElement("div");
noResults.className = "col-md-12 my-4";
noResults.innerHTML = "No results found - try another search term.";
quizzesContainer.appendChild(noResults);
return;
}
quizzes.forEach(function (doc, index) {
Expand Down

0 comments on commit aea31f9

Please sign in to comment.