Annie-McElroy / the-village

Mobile-first application that allows users to share childcare-related resources. Users can set up their own village or join an existing village and submit childcare-related requests and trade "crayons" (points) with other villagers.
MIT License
1 stars 1 forks source link

Annie #74

Closed Annie-McElroy closed 10 months ago

Annie-McElroy commented 10 months ago

Moved village query to it's own component to render the Village info seperately so the Village page could hold only the ternary operator between JoinVillage and VillageInfo for if a villager belongs to a village or not. Both the ternary operator and the VillageInfo works. Re-added the useState and useEffect to try and avoid rendering issues. Need to test that with the new request rendering bug. Updated resolver for creating a new request by adding new: true to the Villager update and Village update to try and resolve rendering issues for new request. Removed use of village ID in the URL from CreateRequest component.

Fixed key bug on request and village list, changed joinvillage back to FindVillage component and created a FindVillageList and JoinVillageBtn component. JoinVillage mutation now works properly and directs to the VillageInfo component. Changed the resolvers for addRequest to not use token for Village update but did not resolve bug where once a new villager joins a new village and tries to make a request the new request does not get added to the Village array in database.

Created helper file to hold the query for finding single villager information and replaced the query in Village.js which works. Added the query into Create Request page but the new created request mutation now seems to be broken even more (doesn't show a new request in the database)