diff --git a/src/components/Courses.tsx b/src/components/Courses.tsx index c63b05e6e..451a7a476 100644 --- a/src/components/Courses.tsx +++ b/src/components/Courses.tsx @@ -22,7 +22,6 @@ export const Courses = ({ courses }: { courses: Course[] }) => { router.push(`/courses/${course.id}`); } }} - key={course.id} /> ))} diff --git a/src/components/VideoPlayer2.tsx b/src/components/VideoPlayer2.tsx index 3089abc7f..555531edc 100644 --- a/src/components/VideoPlayer2.tsx +++ b/src/components/VideoPlayer2.tsx @@ -95,7 +95,7 @@ export const VideoPlayer: FunctionComponent = ({ } interval = window.setInterval( async () => { - if (player.paused()) { + if (player?.paused()) { return; } const currentTime = player.currentTime(); @@ -125,8 +125,6 @@ export const VideoPlayer: FunctionComponent = ({ player.on('play', handleVideoProgress); player.on('ended', () => handleVideoEnded(interval)); return () => { - player.off('play'); - player.off('ended', () => handleVideoEnded(interval)); window.clearInterval(interval); }; }, [player, contentId]); diff --git a/src/components/admin/ContentRendererClient.tsx b/src/components/admin/ContentRendererClient.tsx index d778527fd..39a6c31a8 100644 --- a/src/components/admin/ContentRendererClient.tsx +++ b/src/components/admin/ContentRendererClient.tsx @@ -149,7 +149,7 @@ export const ContentRendererClient = ({ ) : null} - {!showChapters && ( + {!showChapters && metadata.segments?.length > 0 && (