fix: go back one page (#371)
This commit is contained in:
parent
7cbf828f3b
commit
d6ce64ae21
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ export default function FilePagation({ disableMediaPreview, exifEnabled, queryPa
|
|||
const pages = usePaginatedFiles(page, !checked ? 'media' : null);
|
||||
|
||||
if (pages.isSuccess && pages.data.length === 0) {
|
||||
if (page > 1 && numPages > 0) {
|
||||
setPage(page - 1);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Center sx={{ flexDirection: 'column' }}>
|
||||
<Group>
|
||||
|
|
Loading…
Add table
Reference in a new issue