From 8d95e7c864c3485277bc377437221024dc0747cd Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 6 Jun 2026 18:52:24 +0200 Subject: [PATCH] Filter out duplicated genres in manga page --- src/features/manga/components/details/DescriptionGenre.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/manga/components/details/DescriptionGenre.tsx b/src/features/manga/components/details/DescriptionGenre.tsx index a8ca7734..f02e0ad3 100644 --- a/src/features/manga/components/details/DescriptionGenre.tsx +++ b/src/features/manga/components/details/DescriptionGenre.tsx @@ -23,6 +23,7 @@ import type { MangaSourceIdInfo, } from '@/features/manga/Manga.types.ts'; import { SearchLink } from '@/features/manga/components/details/SearchLink.tsx'; +import uniq from 'lodash/fp/uniq'; const OPEN_CLOSE_BUTTON_HEIGHT = '35px'; const DESCRIPTION_COLLAPSED_SIZE = 75; @@ -46,7 +47,7 @@ export const DescriptionGenre = ({ const collapsedSize = description ? Math.min(DESCRIPTION_COLLAPSED_SIZE, descriptionHeight ?? DESCRIPTION_COLLAPSED_SIZE) : 0; - const genres = useMemo(() => mangaGenres.filter(Boolean), [mangaGenres]); + const genres = useMemo(() => uniq(mangaGenres.filter(Boolean)), [mangaGenres]); return ( <>