From e9e54590159ac29eb62c3688fd0fc49c4720983b Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sun, 5 Dec 2021 21:23:19 -0800 Subject: [PATCH] Fix album page genre keys Fix keys for genre/artist columns Fix keys for the album view genre list Additional fix to genre/artist keys --- src/components/library/AlbumView.tsx | 5 ++-- src/components/viewtypes/ListViewTable.tsx | 31 +++++++++------------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/components/library/AlbumView.tsx b/src/components/library/AlbumView.tsx index 1e4f606..bc3f56f 100644 --- a/src/components/library/AlbumView.tsx +++ b/src/components/library/AlbumView.tsx @@ -366,12 +366,11 @@ const AlbumView = ({ ...rest }: any) => { Added {formatDate(data.created)} {data.genre.map((d: Genre, i: number) => { return ( - <> + {i === 0 && ' • '} {i > 0 && ', '} { if (!rest.isModal) { @@ -396,7 +395,7 @@ const AlbumView = ({ ...rest }: any) => { {d.title} - + ); })} diff --git a/src/components/viewtypes/ListViewTable.tsx b/src/components/viewtypes/ListViewTable.tsx index 9b1a706..9cc76a9 100644 --- a/src/components/viewtypes/ListViewTable.tsx +++ b/src/components/viewtypes/ListViewTable.tsx @@ -746,7 +746,7 @@ const ListViewTable = ({ }} > {(rowData.artist || []).map((artist: GenericItem, i: number) => ( - <> + {i > 0 && ', '} - + - + ))} @@ -923,13 +926,9 @@ const ListViewTable = ({ <> {rowData.genre ? ( rowData.genre.map((genre: GenericItem, i: number) => ( - <> - {i > 0 && , } - - + + {i > 0 && ', '} + { @@ -937,15 +936,11 @@ const ListViewTable = ({ dispatch( setActive({ ...album.active, - filter: rowData[column.dataKey][i]?.title, + filter: genre.title, }) ); setTimeout(() => { - history.push( - `/library/album?sortType=${ - rowData[column.dataKey][i]?.title - }` - ); + history.push(`/library/album?sortType=${genre.title}`); }, 50); } }} @@ -962,10 +957,10 @@ const ListViewTable = ({ fontSize: `${fontSize}px`, }} > - {rowData[column.dataKey][i]?.title} + {genre.title} - + )) ) : (