jjPlusPlus / bringme-react-native

A scavenger hunt game using React Native and MLKit
0 stars 1 forks source link

Create new match #20

Closed jjPlusPlus closed 1 year ago

jjPlusPlus commented 1 year ago

This feature adds the new Create Match screen to the application.

Upon clicking the "Create Match" button, a Supabase edge function is called that creates a new match with a randomly generated, unique room code. It also adds the User who created the match as the Host and as one of the Players.

There is an issue in Supabase where you can not have two properties in a single select() statement where you are joining to another table. For this reason, we have to make a double network call, first for the Match and then for the Host (user who created the match).

Screenshot or it didn't happen:

Screenshot 2023-11-08 at 12 04 18 AM

I'm excited for the design pass