HackYourFuture-CPH / simply-name.it

Final Project for Class17
MIT License
3 stars 1 forks source link

get members from db and not json #278

Open senner007 opened 3 years ago

senner007 commented 3 years ago

Description

Get the members from the database and not json file

senner007 commented 3 years ago

Do not merge until ok from @dpfernandes

senner007 commented 3 years ago

Hi! Fantastic work here. I have few comments:

  1. I guess we will need to throw an ApiError also if the getMembers fails.
  2. A state should be added to check if any member is deleted in Owner Page.

Yes, you're right. It has to be added as a state in the context and not as a property on the api object. And yes I think its better to let the board throw an ApiError also. Maybe the context state could house the userId also. So that the subcomponents don't have to both call the useBoard and the useUser each time

senner007 commented 3 years ago

Actually, now that I think about it, maybe its better to fetch the members in a container for the modal. No reason to put the members on the context when its only used by the members modal