default sort by closest to user #466
Labels
Project: Server
Related to the server workspace
sorting and filtering
✅ Status: Dev Ready
This is waiting to be started
related to #465
Description
When retrieving resources by category or subcategory, the client app sorts the results by what is open.
upswyng/packages/web/src/components/CategoryResults.tsx
Line 48 in ebd9dcf
We should add another sorting step that sorts the resources to display those closest to the user first. This could either be done client-side (with another sorting function) or we could update the api to do both of these sorting options server side.
If we want to move this logic to the server, we will need to make a new endpoint (something like
/api/v2/resources
) where the client can send in a bunch of query params and get the specific results they are looking for.Checklist
Tech Notes
sortByProximity
utility.The text was updated successfully, but these errors were encountered: