From ed070850a4a792c1183916cec3ed658688517aa7 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Mon, 24 Jul 2023 14:50:25 -0700 Subject: [PATCH] Remove current album from "more from this artist" --- .../features/albums/components/album-detail-content.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/features/albums/components/album-detail-content.tsx b/src/renderer/features/albums/components/album-detail-content.tsx index 14ad7927..f14948c0 100644 --- a/src/renderer/features/albums/components/album-detail-content.tsx +++ b/src/renderer/features/albums/components/album-detail-content.tsx @@ -187,8 +187,9 @@ export const AlbumDetailContent = ({ tableRef, background }: AlbumDetailContentP const carousels = [ { - data: artistQuery?.data?.items, - isHidden: !artistQuery?.data?.items.length, + data: artistQuery?.data?.items.filter((a) => a.id !== detailQuery?.data?.id), + isHidden: !artistQuery?.data?.items.filter((a) => a.id !== detailQuery?.data?.id) + .length, loading: artistQuery?.isLoading || artistQuery.isFetching, pagination: { handleNextPage: () => handleNextPage('artist'),