Add pagination for "my books" display
This commit is contained in:
@@ -29,8 +29,13 @@ function useFetch(url) {
|
||||
return { data, error }
|
||||
}
|
||||
|
||||
export function getMyBooks(arg) {
|
||||
return useFetch(baseUrl + '/mybooks/' + arg);
|
||||
export function getCountMyBooks(arg) {
|
||||
return useFetch(baseUrl + '/mybooks/' + arg + "/count");
|
||||
}
|
||||
|
||||
export function getMyBooks(arg, limit, offset) {
|
||||
const queryParams = new URLSearchParams({limit: limit, offset: offset});
|
||||
return useFetch(baseUrl + '/mybooks/' + arg + "?" + queryParams.toString());
|
||||
}
|
||||
|
||||
export function getSearchBooks(searchterm) {
|
||||
|
||||
Reference in New Issue
Block a user