I'm using a react component that need me to pass in below prop
<Pager
totalPages={10}
currentPage={1}
/>
I can't figure out the calculation as in the api I have total_items
, not totalPages
. if I have 50 total_items
, how can I produce 5 for the totalPages
prop? says my limit is 10.