mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-11 17:55:33 +00:00
remove duplicates on more content page
This commit is contained in:
parent
49e1423a0e
commit
a128a2cb19
1 changed files with 9 additions and 10 deletions
|
|
@ -57,6 +57,12 @@ export function MoreContent({ onShowDetails }: MoreContentProps) {
|
|||
title: item.title || "",
|
||||
}));
|
||||
|
||||
// Find selected recommendation source (used in multiple places)
|
||||
const selectedRecommendationSource = React.useMemo(
|
||||
() => recommendationSources.find((s) => s.id === selectedRecommendationId),
|
||||
[recommendationSources, selectedRecommendationId],
|
||||
);
|
||||
|
||||
// Determine the actual content type and ID from URL parameters
|
||||
const actualContentType = contentType || category?.split("-")[0] || "popular";
|
||||
const actualMediaType =
|
||||
|
|
@ -79,9 +85,7 @@ export function MoreContent({ onShowDetails }: MoreContentProps) {
|
|||
page: currentPage,
|
||||
genreName: selectedGenre?.name,
|
||||
providerName: selectedProvider?.name,
|
||||
mediaTitle: recommendationSources.find(
|
||||
(s) => s.id === selectedRecommendationId,
|
||||
)?.title,
|
||||
mediaTitle: selectedRecommendationSource?.title,
|
||||
isCarouselView: false,
|
||||
});
|
||||
|
||||
|
|
@ -218,15 +222,10 @@ export function MoreContent({ onShowDetails }: MoreContentProps) {
|
|||
<div className="relative pr-4">
|
||||
<Dropdown
|
||||
selectedItem={
|
||||
recommendationSources.find(
|
||||
(s) => s.id === selectedRecommendationId,
|
||||
)
|
||||
selectedRecommendationSource
|
||||
? {
|
||||
id: selectedRecommendationId,
|
||||
name:
|
||||
recommendationSources.find(
|
||||
(s) => s.id === selectedRecommendationId,
|
||||
)?.title || "",
|
||||
name: selectedRecommendationSource?.title || "",
|
||||
}
|
||||
: { id: "", name: "..." }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue