-
- {progressText}
+ {/* Full-Width Progress Bar Row */}
+
+
+ {/* Glowing Knob */}
+
-
- Resume{" "}
-
+
+ {/* Footer Row */}
+
+
+
+ {progressText}
+
+
+ Resume{" "}
+
+
diff --git a/components/syllabus/module-card.tsx b/components/syllabus/module-card.tsx
index 806f27c..3fb4fae 100644
--- a/components/syllabus/module-card.tsx
+++ b/components/syllabus/module-card.tsx
@@ -104,18 +104,28 @@ export default function ModuleCard({
{/* TOPICS - ALWAYS VISIBLE */}
- {(module.topics || []).map((topic) => (
- e.stopPropagation()}
- className="rounded-full border border-border bg-background px-4 py-2 text-sm font-medium text-foreground transition hover:border-blue-500/40 hover:text-blue-500"
- >
- {topic.title}
-
- ))}
+ {(module.topics || []).map((topic, index) => {
+ const isString = typeof topic === "string";
+ const topicId = isString
+ ? (topic as string)
+ : (topic as { id: string }).id;
+ const topicTitle = isString
+ ? (topic as string)
+ : (topic as { title: string }).title;
+
+ return (
+ e.stopPropagation()}
+ className="rounded-full border border-border bg-background px-4 py-2 text-sm font-medium text-foreground transition hover:border-blue-500/40 hover:text-blue-500"
+ >
+ {topicTitle}
+
+ );
+ })}
diff --git a/lib/content/index.ts b/lib/content/index.ts
index a073467..ff21bb2 100644
--- a/lib/content/index.ts
+++ b/lib/content/index.ts
@@ -98,11 +98,21 @@ export async function getTopicById(
for (const syllabusModule of modules) {
const topics = syllabusModule.topics ?? [];
- const topic = topics.find((item) => item.id === topicId);
+ const topic = topics.find((item) => {
+ if (typeof item === "string") {
+ return item === topicId;
+ }
+ return (item as { id: string }).id === topicId;
+ });
if (topic) {
+ const topicObj =
+ typeof topic === "string"
+ ? ({ id: topic, title: topic, slug: topic, displayOrder: 0 } as Topic)
+ : (topic as Topic);
+
return {
- topic,
+ topic: topicObj,
module: {
id: syllabusModule.id,
number: syllabusModule.number,