Skip to content

Commit

Permalink
fixed search bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalkrishnads committed Jun 27, 2024
1 parent 7eb02de commit 636113c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/dashboard/components/RouteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ const RouteList: VoidComponent<Props> = (props) => {
const searchResults = (searchQuery: string | undefined) => {
let results = routes
if(searchQuery) {
const query = searchQuery.toLowerCase()
results = routes.filter(route => {
const address = route.ui_derived?.address
return address?.start.toLowerCase().includes(searchQuery) || address?.end.toLowerCase().includes(searchQuery)
return address?.start.toLowerCase().includes(query) || address?.end.toLowerCase().includes(query)
})
}
return results
Expand Down

0 comments on commit 636113c

Please sign in to comment.