Link to artist from album list
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
SearchInput,
|
||||
TextField,
|
||||
} from 'react-admin'
|
||||
import { Pagination, Title } from '../common'
|
||||
import { artistLink, Pagination, Title } from '../common'
|
||||
|
||||
const ArtistFilter = (props) => (
|
||||
<Filter {...props}>
|
||||
@@ -15,13 +15,6 @@ const ArtistFilter = (props) => (
|
||||
</Filter>
|
||||
)
|
||||
|
||||
const artistRowClick = (id) => {
|
||||
const filter = { artist_id: id }
|
||||
return `/album?filter=${JSON.stringify(
|
||||
filter
|
||||
)}&order=ASC&sort=maxYear&displayedFilters={"compilation":true}`
|
||||
}
|
||||
|
||||
const ArtistList = (props) => (
|
||||
<List
|
||||
{...props}
|
||||
@@ -35,7 +28,7 @@ const ArtistList = (props) => (
|
||||
perPage={15}
|
||||
pagination={<Pagination />}
|
||||
>
|
||||
<Datagrid rowClick={artistRowClick}>
|
||||
<Datagrid rowClick={artistLink}>
|
||||
<TextField source="name" />
|
||||
<NumberField source="albumCount" />
|
||||
<NumberField source="songCount" />
|
||||
|
||||
Reference in New Issue
Block a user