From e79922def149cd922cade0753e7123226d32720e Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 2 Feb 2021 18:00:06 -0500 Subject: [PATCH] Fix React "unique key prop" warning --- ui/src/album/AlbumDetails.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/album/AlbumDetails.js b/ui/src/album/AlbumDetails.js index 27072e6b7..88bfd8428 100644 --- a/ui/src/album/AlbumDetails.js +++ b/ui/src/album/AlbumDetails.js @@ -81,13 +81,13 @@ const AlbumComment = ({ record }) => { const [expanded, setExpanded] = React.useState(false) const formatted = useMemo(() => { - return record.comment.split('\n').map((line) => ( - <> + return record.comment.split('\n').map((line, idx) => ( + {line}
- +
)) - }, [record.comment]) + }, [record.comment, record.id]) const handleExpandClick = useCallback(() => { setExpanded(!expanded)