From 99ab710e582a59666755a617ab89f1354cdf4cb3 Mon Sep 17 00:00:00 2001 From: taofeeq991 Date: Sun, 25 Oct 2026 13:53:51 +0100 Subject: [PATCH] fix: remove duplicate imports and dead code across module/courses (#520, #521, #522) - credentials.ts: remove duplicate getValidToken import (#520) - module page: remove redundant type-guard render blocks, keep single parseModuleContent call with discriminated-union narrowing (#522) - types/course.ts: remove duplicate ModuleContent definition, duplicate Module.content property, and now-unused type guards / parseModuleContent - package.json: #521 no change needed (duplicates not present) --- .../[courseId]/modules/[moduleId]/page.tsx | 19 ----------- src/lib/api/credentials.ts | 1 - src/types/course.ts | 34 ------------------- 3 files changed, 54 deletions(-) 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) && ( -
-