Skip to content

Commit

Permalink
just grab 100 results max use hits.length
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwatson committed Nov 12, 2020
1 parent 0bcc773 commit 175936a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/use-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const useSearch = () => {
console.log(response.data)
const hits = response.data.result.total_items === 0 ? [] : response.data.result.hits.hits.map(r => r._source)
setResults(hits)
setTotalItems(response.data.result.total_items)
setTotalItems(hits.length)
setIsLoadingResults(false)
}).catch(error => {
setIsLoadingResults(false)
Expand Down

0 comments on commit 175936a

Please sign in to comment.