ElixirMostWanted / elixirmostwanted.com

58 stars 8 forks source link

Add Home LiveView #9

Closed msmithstubbs closed 3 months ago

msmithstubbs commented 3 months ago

This PR adds a Home Liveview at the root / path.

The Home LiveView lists the most wanted by number of votes.

Votes are stored in the vote table, which references the wanteds and users.

Each row in the votes table counts as one vote for a wanted, and a unique index ensures each user can only vote once. (Issue #4 did not mention creating a votes table but I didn't think it was possible to complete without storing votes somehow).

A wanted that is completed is not shown in the Home view.

CleanShot 2024-06-03 at 10 48 00@2x

This PR does not cover creating wanteds (see #7 ) or adding votes.

Closes #4

bcardarella commented 3 months ago

good catch on the votes table, I forgot to spec that out