Story:
As a user, I need a way to join a match that has already been created, after somebody sends me the Match.room_code.
Subtasks
Implement a new Supabase Edge Function /add_player_to_match and /remove_player_from_match. These functions should receive a User ID and then add or remove that User record from a Match record.
a user should not be able to join a match if they are already in an active match
Add a new Screen called JoinMatch. This screen basically needs a text input and button. It needs error messaging for "room not found". Submitting the form should hit the add_player_to_match edge function.
On success, the app should redirect the user to the MatchLobby screen.
Add a button to the MatchLobby that allow a player/User to leave the match (before it starts).
Story: As a user, I need a way to join a match that has already been created, after somebody sends me the
Match.room_code
.Subtasks
/add_player_to_match
and/remove_player_from_match
. These functions should receive a User ID and then add or remove that User record from a Match record.JoinMatch
. This screen basically needs a text input and button. It needs error messaging for "room not found". Submitting the form should hit theadd_player_to_match
edge function.MatchLobby
screen.