fixed Library Slider

This commit is contained in:
Mohammed Abad committed 2026-04-02 03:39:49 +01:00
1 parent ab20a5e64f
commit fac8ba1d19
2 files changed
+2 -2

No files matched your search

@@ -45,7 +45,7 @@ export function WatchActivityChart() {
return buildChartData(data.series, data.movies);
}, [data]);
const years = Array.from({ length: 5 }, (_, i) => currentYear - i);
const years = Array.from({ length: 8 }, (_, i) => currentYear - i);
const showMovies = filter === 'all' || filter === 'movies';
const showEpisodes = filter === 'all' || filter === 'episodes';
@@ -14,6 +14,7 @@ interface TrendingSliderProps {
export function TrendingSlider({ entries, isLoading }: TrendingSliderProps) {
const [currentIndex, setCurrentIndex] = useState(0);
const createEntry = useCreateEntry();
const libraryEntries = useLibraryStore((s) => s.entries);
const display = entries.slice(0, 10);
const countRef = useRef(display.length);
countRef.current = display.length;
@@ -53,7 +54,6 @@ export function TrendingSlider({ entries, isLoading }: TrendingSliderProps) {
: null;
const isTv = item.media_type === 'tv' || !!item.name;
const libraryEntries = useLibraryStore((s) => s.entries);
const matchedEntry = Array.from(libraryEntries.values()).find(
(e) => e.entryIds?.tmdb_id === item.id
);