diff --git a/ui/src/artist/ArtistList.js b/ui/src/artist/ArtistList.js index 0d5c7c1df..e3e546974 100644 --- a/ui/src/artist/ArtistList.js +++ b/ui/src/artist/ArtistList.js @@ -1,4 +1,5 @@ import React, { cloneElement, isValidElement, useState } from 'react' +import { useHistory } from 'react-router-dom' import { Datagrid, DatagridBody, @@ -71,45 +72,49 @@ const ArtistDatagrid = (props) => ( } /> ) -const ArtistList = ({ width, ...rest }) => { +const ArtistListView = ({ hasShow, hasEdit, hasList, width, ...rest }) => { const classes = useStyles() const handleArtistLink = useGetHandleArtistClick(width) + const history = useHistory() const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs')) + return isXsmall ? ( + r.name} + linkType={(id) => { + history.push(handleArtistLink(id)) + }} + rightIcon={(r) => } + {...rest} + /> + ) : ( + + + + + + + } + /> + + ) +} + +const ArtistList = (props) => { return ( <> } > - {isXsmall ? ( - r.name} - linkType={'show'} - rightIcon={(r) => } - {...rest} - /> - ) : ( - - - - - - - } - /> - - )} +