MCPcopy Create free account
hub / github.com/027xiguapi/code-box / paginate

Function paginate

tabs/history.tsx:61–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 }, [history])
60
61 function paginate() {
62 let startIndex = (pageNumber - 1) * pageSize
63 let endIndex = pageNumber * pageSize
64 let records = history.slice(startIndex, endIndex)
65 setIsMore(records.length >= pageSize)
66 return records
67 }
68
69 function filterHistory() {
70 const _filterVal = String(filterVal).trim().toLowerCase()

Callers 2

HistoryPageFunction · 0.85
onLoadMoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected