New component for mobile Artist List (#891)

Fixes #890
This commit is contained in:
Arbaz Ahmed
2021-03-26 08:15:21 +05:30
committed by GitHub
parent e575825c33
commit 01ba00ccdd
3 changed files with 92 additions and 8 deletions
+11 -8
View File
@@ -15,8 +15,8 @@ import {
ArtistContextMenu,
List,
QuickFilter,
SimpleList,
useGetHandleArtistClick,
ArtistSimpleList,
} from '../common'
import { makeStyles } from '@material-ui/core/styles'
@@ -49,18 +49,21 @@ const ArtistFilter = (props) => (
</Filter>
)
const ArtistListView = ({ hasShow, hasEdit, hasList, width, ...rest }) => {
const ArtistListView = ({
hasShow,
hasEdit,
hasList,
width,
syncWithLocation,
...rest
}) => {
const classes = useStyles()
const handleArtistLink = useGetHandleArtistClick(width)
const history = useHistory()
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
return isXsmall ? (
<SimpleList
primaryText={(r) => r.name}
linkType={(id) => {
history.push(handleArtistLink(id))
}}
rightIcon={(r) => <ArtistContextMenu record={r} />}
<ArtistSimpleList
linkType={(id) => history.push(handleArtistLink(id))}
{...rest}
/>
) : (