{!sidebarCollapsed && (
-

)}
diff --git a/src/components/pages/ContentManager.tsx b/src/components/pages/ContentManager.tsx
index 819b1f0..2bfb766 100644
--- a/src/components/pages/ContentManager.tsx
+++ b/src/components/pages/ContentManager.tsx
@@ -132,25 +132,25 @@ export function ContentManager({
const getCurrentContentType = () => {
console.log('🔄 getCurrentContentType called with currentRoute:', currentRoute);
-
+
// Find exact route match first
const exactMatch = contentTypes.find(type => currentRoute === type.route);
if (exactMatch) {
console.log('✅ Exact route match found:', exactMatch.id);
return exactMatch;
}
-
+
// Find partial match for nested routes
- const partialMatch = contentTypes.find(type =>
- currentRoute.startsWith(type.route + '/') ||
+ const partialMatch = contentTypes.find(type =>
+ currentRoute.startsWith(type.route + '/') ||
currentRoute.includes(type.id)
);
-
+
if (partialMatch) {
console.log('✅ Partial route match found:', partialMatch.id);
return partialMatch;
}
-
+
console.log('⚠️ No match found, defaulting to profiler');
return contentTypes[0]; // Default to profiler
};
@@ -159,34 +159,33 @@ export function ContentManager({
console.log('📌 Current content type:', currentContentType.label);
const getBreadcrumbs = () => {
- const breadcrumbs = [
- { label: "Content", href: "/content" }
- ];
+ const breadcrumbs = [{ label: "Content", href: "/content" }];
- // Add specific content type to breadcrumbs if not on the main content page
- if (currentRoute !== "/content") {
+ // Always show current content type
+ if (currentContentType) {
breadcrumbs.push({ label: currentContentType.label });
}
return breadcrumbs;
};
+
const renderContent = () => {
console.log('🎨 Rendering content for:', currentContentType.id);
-
+
switch (currentContentType.id) {
case "profiler":
return
;
-
+
case "blogs":
return
;
-
+
case "faqs":
return
;
-
+
case "webcasts":
return
;
-
+
case "training-materials":
return (
);
-
+
case "reading-materials":
return
;
-
+
case "podcasts":
return
;
-
+
case "case-studies":
return
;
-
+
case "klc-archives":
return (
);
-
+
default:
console.log('⚠️ Defaulting to profiler tab');
return
;
@@ -237,7 +236,7 @@ export function ContentManager({
{currentContentType.label}
- {currentContentType.id === "profiler"
+ {currentContentType.id === "profiler"
? "Manage all content types and profiler submissions with approval workflow"
: `Manage and organize ${currentContentType.label.toLowerCase()}`
}