bcfoodapp / streetfoodlove

StreetFoodLove capstone project
3 stars 1 forks source link

Make Searches not Case Sensitive #456

Closed czhou578 closed 2 years ago

MakotoE commented 2 years ago

I know of many restaurants where their names start with a lowercase letter, so this isn't going to work for all restaurant names. Why not change the search string to be lowercase, and compare to lowercase versions of vendor names?

czhou578 commented 2 years ago

image image It seems to work on my end?

MakotoE commented 2 years ago

Sorry, I didn't notice you changed line 98 as well. Why not make it just string.toLowerCase()?

MakotoE commented 2 years ago

You will want to make these two comparisons on lowercase strings as well: https://github.com/bcfoodapp/streetfoodlove/blob/62467175b9e22551df10bdf924c779806fb328f8/app/src/components/UI/Atoms/SearchBox/SearchBox.tsx#L110 https://github.com/bcfoodapp/streetfoodlove/blob/62467175b9e22551df10bdf924c779806fb328f8/app/src/components/UI/Atoms/SearchBox/SearchBox.tsx#L125