Skip to content

Commit

Permalink
fix: linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nimit9 committed Feb 3, 2024
1 parent da78ea7 commit 5c9404a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/components/Courses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const Courses = ({ courses }: { courses: Course[] }) => {
router.push(`/courses/${course.id}`);
}
}}
key={course.id}
/>
))}
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/components/VideoPlayer2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
}
interval = window.setInterval(
async () => {
if (player.paused()) {
if (player?.paused()) {
return;
}
const currentTime = player.currentTime();
Expand Down Expand Up @@ -125,8 +125,6 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
player.on('play', handleVideoProgress);
player.on('ended', () => handleVideoEnded(interval));
return () => {
player.off('play');
player.off('ended', () => handleVideoEnded(interval));
window.clearInterval(interval);
};
}, [player, contentId]);
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/ContentRendererClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const ContentRendererClient = ({
</a>
</div>
) : null}
{!showChapters && (
{!showChapters && metadata.segments?.length > 0 && (
<button
className="bg-blue-500 hover:bg-blue-700 text-white font-bold rounded p-2"
onClick={() => {
Expand Down

0 comments on commit 5c9404a

Please sign in to comment.