diff --git a/src/components/CourseView.tsx b/src/components/CourseView.tsx index 675c9c361..5133719b6 100644 --- a/src/components/CourseView.tsx +++ b/src/components/CourseView.tsx @@ -43,6 +43,7 @@ export const CourseView = ({ {contentType === 'video' ? ( { const session = await getServerSession(authOptions); @@ -61,6 +62,7 @@ export const getMetadata = async (contentId: number) => { export const ContentRenderer = async ({ content, nextContent, + courseId, }: { nextContent: { id: number; @@ -77,11 +79,13 @@ export const ContentRenderer = async ({ markAsCompleted: boolean; bookmark: Bookmark | null; }; + courseId: number; }) => { const metadata = await getMetadata(content.id); - + const prevNextUrls = await getNextPrevUrls(content.id, courseId); return ( { const [contentCompleted, setContentCompleted] = useState( content.markAsCompleted, @@ -34,7 +39,6 @@ export const ContentRendererClient = ({ metadata?.segments?.length > 0, ); const searchParams = useSearchParams(); - const router = useRouter(); //@ts-ignore @@ -150,6 +154,26 @@ export const ContentRendererClient = ({ ) : null} +
+ + +
{!showChapters && metadata.segments?.length > 0 && (