Rebuild-Black-Business / RBB-Website

Website to help connect black-owned businesses with consumers and resources
https://www.rebuildblackbusiness.com/
MIT License
119 stars 73 forks source link

[BUG] Fix Home Page Shows Incorrect Listings #370

Closed elchris closed 3 years ago

elchris commented 3 years ago

Describe the bug https://www.rebuildblackbusiness.com/businesses/ is still making this api call:

https://api.rbb-api.com/api/v1/businesses?page=1&pageSize=11&in-need=true

with the "in-need" in the parameter, when that parameter should be omitted entirely. I think I called this out like a month ago.

essentially it should show you the same results as if you clicked "search" on the form with no filters, which is basically this page:

https://www.rebuildblackbusiness.com/businesses/all

which indeed appears to make the correct API call: https://api.rbb-api.com/api/v1/businesses?page=1&pageSize=11

I believe this bug is from an incomplete implementation of #343

To Reproduce Steps to reproduce the behavior:

  1. Go to rebuildblackbusiness.com and click "SEE BUSINESSES"
  2. Notice that the first result on the page is "Nari Boo Cosmetics" which was part of our original "In Need" businesses. We should be looking at ALL BUSINESSES on the main page, not just a small subset.
  3. Also notice the pagination is only "12 pages" which further demonstrates the limited set of results

Expected behavior The first page of businesses should be showing all businesses, as if someone had clicked "search" without selecting any filter or entering any location

elchris commented 3 years ago

This was fixed as part of #374 -- thank you @Mhmdabed11 !!!!

elchris commented 3 years ago

see above comment