mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-04 01:08:54 +01:00
11 lines
436 B
React
11 lines
436 B
React
|
|
import { useAlbumsPerPage } from './useAlbumsPerPage'
|
||
|
|
import config from '../config.js'
|
||
|
|
|
||
|
|
export const useGetHandleArtistClick = (width) => {
|
||
|
|
const [perPage] = useAlbumsPerPage(width)
|
||
|
|
return (id) => {
|
||
|
|
return config.devShowArtistPage && id !== config.variousArtistsId
|
||
|
|
? `/artist/${id}/show`
|
||
|
|
: `/album?filter={"artist_id":"${id}"}&order=ASC&sort=max_year&displayedFilters={"compilation":true}&perPage=${perPage}`
|
||
|
|
}
|
||
|
|
}
|