quintodrome/ui/src/song/AlbumLinkField.jsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
439 B
React
Raw Normal View History

2020-03-30 15:34:00 -08:00
import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-admin'
2020-03-30 15:34:00 -08:00
export const AlbumLinkField = (props) => (
<Link
to={`/album/${props.record.albumId}/show`}
onClick={(e) => e.stopPropagation()}
>
{props.record.album}
</Link>
)
AlbumLinkField.propTypes = {
sortBy: PropTypes.string,
sortByOrder: PropTypes.oneOf(['ASC', 'DESC']),
}
2020-03-30 15:34:00 -08:00
AlbumLinkField.defaultProps = {
addLabel: true,
}