fix: go back one page (#371)

This commit is contained in:
diced 2023-04-30 15:31:19 -07:00
parent 7cbf828f3b
commit d6ce64ae21
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1

View file

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