-
-
-
- {pathnameTransformed[pathnameTransformed.length - 1]}
-
-
-
- {pathnameTransformed
- ?.filter((item) => item !== "Admin")
- .map((item, index, array) => (
-
-
- handleAction(pathnameSplit[index])}
- className={
- pathnameSplit[index] === currentPage
- ? "font-semibold"
- : ""
- }
- >
- {item}
-
-
- {index < array.length - 1 && }
-
- ))}
-
-
-
-
+ const getPageIcon = () => {
+ if (pathname.includes("dashboard")) return
;
+ if (pathname.includes("article")) return
;
+ if (pathname.includes("master-category")) return
;
+ if (pathname.includes("magazine")) return
;
+ if (pathname.includes("static-page")) return
;
+ if (pathname.includes("master-user")) return
;
+ if (pathname.includes("master-role")) return
;
+ return null;
+ };
- {/*
- {!isOpen && (
-
- )}
-
*/}
-
- {pathname.includes("dashboard") &&
}
- {pathname.includes("article") &&
}
- {pathname.includes("master-category") && (
-
- )}
- {pathname.includes("magazine") &&
}
- {pathname.includes("static-page") &&
}
- {pathname.includes("master-user") &&
}
- {pathname.includes("master-role") &&
}
- {/*
*/}
-
+ if (!mounted) {
+ return (
+
-
);
};
diff --git a/components/main/dashboard/dashboard-container.tsx b/components/main/dashboard/dashboard-container.tsx
index 7d1c618..5baadef 100644
--- a/components/main/dashboard/dashboard-container.tsx
+++ b/components/main/dashboard/dashboard-container.tsx
@@ -36,6 +36,7 @@ import { Label } from "@/components/ui/label";
import { Calendar } from "@/components/ui/calendar";
import ApexChartColumn from "@/components/main/dashboard/chart/column-chart";
import CustomPagination from "@/components/layout/custom-pagination";
+import { motion } from "framer-motion";
type ArticleData = Article & {
no: number;
@@ -190,335 +191,281 @@ export default function DashboardContainer() {
};
return (
-