fixed Library Slider
This commit is contained in:
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);
|
return buildChartData(data.series, data.movies);
|
||||||
}, [data]);
|
}, [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 showMovies = filter === 'all' || filter === 'movies';
|
||||||
const showEpisodes = filter === 'all' || filter === 'episodes';
|
const showEpisodes = filter === 'all' || filter === 'episodes';
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ interface TrendingSliderProps {
|
|||||||
export function TrendingSlider({ entries, isLoading }: TrendingSliderProps) {
|
export function TrendingSlider({ entries, isLoading }: TrendingSliderProps) {
|
||||||
const [currentIndex, setCurrentIndex] = useState(0);
|
const [currentIndex, setCurrentIndex] = useState(0);
|
||||||
const createEntry = useCreateEntry();
|
const createEntry = useCreateEntry();
|
||||||
|
const libraryEntries = useLibraryStore((s) => s.entries);
|
||||||
const display = entries.slice(0, 10);
|
const display = entries.slice(0, 10);
|
||||||
const countRef = useRef(display.length);
|
const countRef = useRef(display.length);
|
||||||
countRef.current = display.length;
|
countRef.current = display.length;
|
||||||
@@ -53,7 +54,6 @@ export function TrendingSlider({ entries, isLoading }: TrendingSliderProps) {
|
|||||||
: null;
|
: null;
|
||||||
const isTv = item.media_type === 'tv' || !!item.name;
|
const isTv = item.media_type === 'tv' || !!item.name;
|
||||||
|
|
||||||
const libraryEntries = useLibraryStore((s) => s.entries);
|
|
||||||
const matchedEntry = Array.from(libraryEntries.values()).find(
|
const matchedEntry = Array.from(libraryEntries.values()).find(
|
||||||
(e) => e.entryIds?.tmdb_id === item.id
|
(e) => e.entryIds?.tmdb_id === item.id
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user