BarneyShi / Team1-VanHouse

CPSC455 course project.
0 stars 1 forks source link

Get posts #28

Closed NaithanB closed 3 years ago

NaithanB commented 3 years ago

Hi all,

I think I’ve finished merging Yuxin’s filter queries. I pulled from Barney's branch earlier, and worked with that. I wouldn’t be surprised if there are some changes I need to make. Please let me know if you notice anything weird or messy that I've introduced.

@tyxxxx , I changed the implementation a bit so that I could display the loading spinner and error messages and also switch between filtered and unfiltered posts. I removed the state in App.js that stored the filtered posts and moved it into PostCollection. Instead of having a separate hook in each filter component and then copying all of the results over, I changed it to just pass the query url and then used one hook in PostCollection to execute all of the filter queries. It makes the code a lot shorter and it lets me set the isLoading and displayErrors states for the queries. I also removed the occasional commented out block of code and console.log statement. Hope that’s okay.

@tyxxxx I also found some more changes that would be helpful for you to make if possible.

Thanks, Naithan