Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add “No Election Found” Message for Empty Filtered List #72

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dakshmehta007
Copy link

Description:

This PR addresses the issue of displaying a message when the filtered list of elections is empty.

Fixes:

issue No.: #61 and #62

Screenshot:

Screenshot 2024-09-15 223642

The following changes have been made:

Updated ElectionDash.tsx:
Added an if-else condition to check if the filtered list is empty.
Implemented logic to display a “No Election Found” message when no elections match the filter criteria.
Updated ElectionInfoCard.tsx:
Modified the component to handle the new condition and display the appropriate message.

Testing:

Verified that the “No Election Found” message appears when the filtered list is empty.
Ensured that the election cards display correctly when there are matching elections.

@Ronnieraj37
Copy link
Contributor

@dakshmehta007 Please look at the comment from #62 (comment) and try to improve the code. As you've also created a noElections object which is not needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants