BuidlGuidl / hackathon-starter-kit

https://extensions-hackathon.vercel.app
MIT License
6 stars 1 forks source link

feat: Move admin eligibility picker. Add loading states for votes and eligibility #69

Closed ChangoMan closed 1 month ago

ChangoMan commented 1 month ago

Description

  1. Move the eligibility picker into a dropdown, and make it look like a badge in the top right of the submission card. I made the colors Gray if not selected, Red if "Not Eligible", and Green if "Eligible". Let me know how you all like this look
  2. Add loading state for clearing votes and setting eligibility
  3. Add an empty message to the Not Voted and Voted tabs, if either of the arrays are empty

Screenshots

Screenshot 2024-08-29 at 4 47 42 PM Screenshot 2024-08-29 at 4 32 08 PM
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
extensions-hackathon ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 0:54am
ChangoMan commented 1 month ago

Working great @ChangoMan !!

A couple of things:

  1. Would it be easy to close the dropdown when clicking outside? You can only close it by clicking on the dropdown title.

  2. Maybe we could also close it once the flag is set? Like you open the dropdown, click on "eligible" and when the request return (and the flag is set) we close the dropdown.

@carletex I switched the dropdown to close on clicking outside, let me know how this feels. Do note that with this method, clicking on the dropdown title will no longer close the dropdown.

I was also able to close the dropdown once we set the flag.

carletex commented 1 month ago

Works great. Thanks @ChangoMan