mirror of
https://github.com/Damillora/Shioriko.git
synced 2024-11-22 12:27:33 +00:00
fix: pagination total pages
This commit is contained in:
parent
9624a408b2
commit
5123bc8a24
@ -13,6 +13,7 @@
|
|||||||
const data = await getPosts({page});
|
const data = await getPosts({page});
|
||||||
if(Array.isArray(data.posts)) {
|
if(Array.isArray(data.posts)) {
|
||||||
posts = data.posts;
|
posts = data.posts;
|
||||||
|
totalPages = data.totalPage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
queryParams = queryString.parse(location.search);
|
queryParams = queryString.parse(location.search);
|
||||||
if(queryParams.page) {
|
if(queryParams.page) {
|
||||||
page = queryParams.page;
|
page = queryParams.page;
|
||||||
|
totalPages = data.totalPage;
|
||||||
}
|
}
|
||||||
getData();
|
getData();
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user