Add pagination for "my books" display

This commit is contained in:
2025-11-10 20:44:47 +01:00
parent 870158e489
commit 87f6daef18
13 changed files with 355 additions and 24 deletions

View File

@@ -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) {