mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 10:27:08 +02:00
feat(ui): update AlbumListPagination to conditionally render based on albumListType
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
f097714514
commit
cafcb0bb59
1 changed files with 9 additions and 4 deletions
|
|
@ -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 ? (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue