Fix CollapsibleComment in PlaylistDetails. Closes #2992
This commit is contained in:
parent
aef49cb8d6
commit
544ae90ec1
|
@ -39,6 +39,10 @@ export const CollapsibleComment = ({ record }) => {
|
|||
setExpanded(!expanded)
|
||||
}, [expanded, setExpanded])
|
||||
|
||||
if (lines.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Collapse
|
||||
collapsedHeight={'2em'}
|
||||
|
|
|
@ -50,7 +50,6 @@ const PlaylistDetails = (props) => {
|
|||
<Typography variant="h5" className={classes.title}>
|
||||
{record.name || translate('ra.page.loading')}
|
||||
</Typography>
|
||||
<CollapsibleComment record={record} />
|
||||
<Typography component="p">
|
||||
{record.songCount ? (
|
||||
<span>
|
||||
|
@ -67,6 +66,7 @@ const PlaylistDetails = (props) => {
|
|||
<span> </span>
|
||||
)}
|
||||
</Typography>
|
||||
<CollapsibleComment record={record} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue