Spaces:
Sleeping
Sleeping
Update web/src/components/sidebar/CourseInfoSection.tsx
Browse files
web/src/components/sidebar/CourseInfoSection.tsx
CHANGED
|
@@ -64,21 +64,15 @@ export function CourseInfoSection({
|
|
| 64 |
|
| 65 |
// ---------- Fallback:不要静默消失 ----------
|
| 66 |
if (!courseInfo) {
|
| 67 |
-
const wsName = (currentWorkspace as any)?.name ?? "";
|
| 68 |
-
const sel = (selectedCourse || "").trim();
|
| 69 |
-
|
| 70 |
return (
|
| 71 |
<div className="w-full">
|
| 72 |
<div className="px-4 pt-4 pb-3 space-y-2">
|
| 73 |
-
<div className="
|
| 74 |
-
<div className="
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
</div>
|
| 80 |
-
<div className="text-xs text-muted-foreground">
|
| 81 |
-
currentWorkspace: <span className="font-medium">{wsName || "—"}</span>
|
| 82 |
</div>
|
| 83 |
</div>
|
| 84 |
<Separator className="bg-[#ECECF1]" />
|
|
@@ -86,6 +80,7 @@ export function CourseInfoSection({
|
|
| 86 |
);
|
| 87 |
}
|
| 88 |
|
|
|
|
| 89 |
// ---------- Display fields ----------
|
| 90 |
const courseName = courseInfo.name ?? (selectedCourse || "Course");
|
| 91 |
|
|
|
|
| 64 |
|
| 65 |
// ---------- Fallback:不要静默消失 ----------
|
| 66 |
if (!courseInfo) {
|
|
|
|
|
|
|
|
|
|
| 67 |
return (
|
| 68 |
<div className="w-full">
|
| 69 |
<div className="px-4 pt-4 pb-3 space-y-2">
|
| 70 |
+
<div className="text-xs text-red-600">COURSEINFO ACTIVE (fallback)</div>
|
| 71 |
+
<div className="font-semibold text-base">No course matched</div>
|
| 72 |
+
<div className="text-xs text-muted-foreground space-y-1">
|
| 73 |
+
<div>selectedCourse: <span className="font-medium">{String(selectedCourse || "")}</span></div>
|
| 74 |
+
<div>availableCourses: <span className="font-medium">{availableCourses?.length ?? 0}</span></div>
|
| 75 |
+
<div>currentWorkspaceId: <span className="font-medium">{String(currentWorkspaceId)}</span></div>
|
|
|
|
|
|
|
|
|
|
| 76 |
</div>
|
| 77 |
</div>
|
| 78 |
<Separator className="bg-[#ECECF1]" />
|
|
|
|
| 80 |
);
|
| 81 |
}
|
| 82 |
|
| 83 |
+
|
| 84 |
// ---------- Display fields ----------
|
| 85 |
const courseName = courseInfo.name ?? (selectedCourse || "Course");
|
| 86 |
|