feat(ui): update AlbumListPagination to conditionally render based on albumListType

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2026-03-25 19:31:12 -04:00
commit cafcb0bb59

View file

@ -175,12 +175,12 @@ const AlbumListTitle = ({ albumListType }) => {
return <Title subTitle={title} args={{ smart_count: 2 }} />
}
const AlbumListPagination = (props) => {
const AlbumListPagination = ({ albumListType, ...rest }) => {
const { loading } = useListContext()
if (loading) {
if (loading && albumListType === 'random') {
return null
}
return <Pagination {...props} />
return <Pagination {...rest} />
}
const randomStartingSeed = Math.random().toString()
@ -243,7 +243,12 @@ const AlbumList = (props) => {
actions={<AlbumListActions />}
filters={<AlbumFilter />}
perPage={perPage}
pagination={<AlbumListPagination rowsPerPageOptions={perPageOptions} />}
pagination={
<AlbumListPagination
rowsPerPageOptions={perPageOptions}
albumListType={albumListType}
/>
}
title={<AlbumListTitle albumListType={albumListType} />}
>
{albumView.grid ? (