Fix CollapsibleComment in PlaylistDetails. Closes #2992

This commit is contained in:
Deluan 2024-05-02 13:48:10 -04:00
parent aef49cb8d6
commit 544ae90ec1
2 changed files with 5 additions and 1 deletions

View File

@ -39,6 +39,10 @@ export const CollapsibleComment = ({ record }) => {
setExpanded(!expanded)
}, [expanded, setExpanded])
if (lines.length === 0) {
return null
}
return (
<Collapse
collapsedHeight={'2em'}

View File

@ -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>&nbsp;</span>
)}
</Typography>
<CollapsibleComment record={record} />
</CardContent>
</Card>
)