ui(nests): fix broken pagination
This commit is contained in:
parent
984a774811
commit
7b38f05019
1 changed files with 7 additions and 1 deletions
|
@ -42,7 +42,13 @@ export default (include: string[] = []) => {
|
||||||
const { page } = useContext(Context);
|
const { page } = useContext(Context);
|
||||||
|
|
||||||
return useSWR<PaginatedResult<Nest>>([ 'nests', page ], async () => {
|
return useSWR<PaginatedResult<Nest>>([ 'nests', page ], async () => {
|
||||||
const { data } = await http.get('/api/application/nests', { params: { include: include.join(','), page } });
|
const { data } = await http.get('/api/application/nests', {
|
||||||
|
params: {
|
||||||
|
include: include.join(','),
|
||||||
|
per_page: 10,
|
||||||
|
page,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return ({
|
return ({
|
||||||
items: (data.data || []).map(rawDataToNest),
|
items: (data.data || []).map(rawDataToNest),
|
||||||
|
|
Loading…
Reference in a new issue