diff --git a/src/app/courses/[courseId]/modules/[moduleId]/page.tsx b/src/app/courses/[courseId]/modules/[moduleId]/page.tsx
index adcf7f3..fff91f5 100644
--- a/src/app/courses/[courseId]/modules/[moduleId]/page.tsx
+++ b/src/app/courses/[courseId]/modules/[moduleId]/page.tsx
@@ -19,7 +19,6 @@ import {
} from "lucide-react";
import Link from "next/link";
import { useState } from "react";
-import { isTextContent, isVideoContent, isInteractiveContent } from "@/types/course";
export default function ModulePage({
params,
@@ -109,24 +108,6 @@ export default function ModulePage({
{module.description}
- {/* #498 — Render module content with proper type handling */}
- {isTextContent(module.content) && (
-
- )}
- {isVideoContent(module.content) && (
-
-
-
- )}
- {isInteractiveContent(module.content) && (
-
{content.type === "video" ? (
{content.url ? (
diff --git a/src/lib/api/credentials.ts b/src/lib/api/credentials.ts
index 69afc30..b5f2dfa 100644
--- a/src/lib/api/credentials.ts
+++ b/src/lib/api/credentials.ts
@@ -22,7 +22,6 @@ export interface VerifyCredentialResult {
verifiedAt?: string;
error?: VerifyCredentialError;
}
-import { getValidToken } from "./auth";
/**
* Fetch all credentials for the authenticated user.
diff --git a/src/types/course.ts b/src/types/course.ts
index 6f058cd..74f3414 100644
--- a/src/types/course.ts
+++ b/src/types/course.ts
@@ -13,15 +13,6 @@ export interface Course {
createdAt: string;
}
-// #498 — Content payload union: text is markdown/HTML string, video is a URL,
-// interactive is a config object. This replaces the previous `content: string`
-// which forced casting in parseModuleContent.
-export type ModuleContent =
- | string // text/markdown content
- | { type: "video"; url: string; duration?: number }
- | { type: "interactive"; config: Record };
-
-
export interface Module {
id: string;
courseId: string;
@@ -29,36 +20,11 @@ export interface Module {
description: string;
order: number;
contentType: "text" | "video" | "interactive";
- content: ModuleContent;
content: string | ModuleContent;
estimatedMinutes: number;
isCompleted?: boolean;
}
-// #498 — Type guard for Module.content
-export function isTextContent(content: ModuleContent): content is string {
- return typeof content === "string";
-}
-
-export function isVideoContent(
- content: ModuleContent
-): content is { type: "video"; url: string; duration?: number } {
- return typeof content === "object" && content !== null && "type" in content && content.type === "video";
-}
-
-export function isInteractiveContent(
- content: ModuleContent
-): content is { type: "interactive"; config: Record } {
- return typeof content === "object" && content !== null && "type" in content && content.type === "interactive";
-}
-
-// #498 — Safe parser that returns string content or empty string
-export function parseModuleContent(content: ModuleContent): string {
- if (isTextContent(content)) return content;
- if (isVideoContent(content)) return content.url;
- return "";
-}
-
export interface CourseEnrollment {
id: string;
courseId: string;