spicygreenbook / greenbook-app

We are Spicy Green Book – a virtual directory for Black-owned food and beverage businesses throughout the US and Canada. We help Black-owned food and drink business owners tell their story, sowing the seeds of trust, support, and positive change within local communities.
https://www.spicygreenbook.org
46 stars 60 forks source link

App Malfunction #426

Closed danilobatson closed 2 years ago

danilobatson commented 2 years ago

Describe the bug The App is crashing whenever you click on a listing.

To Reproduce Steps to reproduce the behavior:

  1. Open App
  2. In search bar type in 'All Flavor No Grease' in 'Los Angeles, CA'
  3. Click on listing
  4. See error

Expected behavior Listing should show where you can see the business information and the gallery.

Note: A few days ago a listing would show but the app would not render any photos in the gallery. Currently after clicking on listing you only get a blank screen.

Smartphone (please complete the following information):

C-Garza commented 2 years ago

The issue is in the Listing.js file shown here: https://github.com/spicygreenbook/greenbook-app/blob/c990e52fe53e987fa00a075ba03fd94b3984f042/screens/Listing.js#L221

For that particular listing, they don't have a cuisines length, so 0 is being rendered on screen, which crashes on the app because text has to be in a <Text> component. You can actually see the 0 being rendered on the web version of the listing: All Flavor No Grease I can make a quick PR to fix this issue.