wavesinaroom / my_odin_project_photo_tag

0 stars 0 forks source link

Input #4

Closed wavesinaroom closed 1 year ago

wavesinaroom commented 1 year ago

Description

Users are prompted to input a user name to be stored with his time record on the server. Data submission takes a user to a leader board where his/her record is registered and sorted

Tests

wavesinaroom commented 1 year ago

Player's record is implemented but not tested. There's no way to tell if it works well until the gameover condition is met when player's found Sarah's toys

wavesinaroom commented 1 year ago

I'll merge this branch into main but I won't close this issue

wavesinaroom commented 1 year ago

I'm passing down LeadBoard state and props which means that input should exist as a component by itself. It seems to me that the input dialog should go inside LeadeBoard

wavesinaroom commented 1 year ago

By the way, input now sends data to its database, that was cool to accomplish

wavesinaroom commented 1 year ago

Rendering is sketch but it needes improvements. The input dialog doesn't close on data submition, records table should be hidden of makes somehow with css and there's no back to home button. However this is just the beginning, it'll be better soon. For now, I need to focus on how to render existing data from the data base without fetching it with an extra useEffect function. There might be a way to do so with a supase API function

wavesinaroom commented 1 year ago

UI rendering works well now. I'm still wondering if I do need to fetch data from the data base with useEffect

wavesinaroom commented 1 year ago

As input has been working fine for a while and I completely forgot to continue my comments on the leader board issue, I'm closing this one now