Skip to content

Commit

Permalink
fix: prevent recommendations as feed
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Sep 19, 2024
1 parent c27a1e6 commit 3cc10b7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ const MediaMovie: ScreenComponent<PlaylistItem> = ({ data, isLoading }) => {

// Handlers
const goBack = () => data && navigate(mediaURL({ media: data, playlistId: feedId, play: false }));
const getUrl = (item: PlaylistItem) => mediaURL({ media: item, playlistId: features?.recommendationsPlaylist });
const getUrl = (item: PlaylistItem) => mediaURL({ media: item, playlistId: feedId });

const handleComplete = useCallback(() => {
if (!id || !playlist) return;

const index = playlist.playlist.findIndex(({ mediaid }) => mediaid === id);
const nextItem = playlist.playlist[index + 1];

return nextItem && navigate(mediaURL({ media: nextItem, playlistId: features?.recommendationsPlaylist, play: true }));
}, [id, playlist, navigate, features?.recommendationsPlaylist]);
return nextItem && navigate(mediaURL({ media: nextItem, playlistId: feedId, play: true }));
}, [id, playlist, navigate, feedId]);

useEffect(() => {
(document.scrollingElement || document.body).scroll({ top: 0 });
Expand Down

0 comments on commit 3cc10b7

Please sign in to comment.