Hide Love button on Artist Page when EnableFavourites=false. Fix #2245

This commit is contained in:
Deluan
2023-03-10 23:31:32 -05:00
parent b520d8827a
commit ec0eb2866b
3 changed files with 18 additions and 25 deletions
+4
View File
@@ -6,6 +6,7 @@ import IconButton from '@material-ui/core/IconButton'
import { makeStyles } from '@material-ui/core/styles'
import { useToggleLove } from './useToggleLove'
import { useRecordContext } from 'react-admin'
import config from '../config'
const useStyles = makeStyles({
love: {
@@ -38,6 +39,9 @@ export const LoveButton = ({
[toggleLove]
)
if (!config.enableFavourites) {
return <></>
}
return (
<Button
onClick={handleToggleLove}