import React, { useState } from "react"; import AdminLayout from "./Layout/AdminLayout"; import { FaHome } from "react-icons/fa"; import { FaShop, FaUser } from "react-icons/fa6"; import ReactApexChart from "react-apexcharts"; const Dashboard = (props) => { const { module, user, materi } = props; const [barChart, setBarChart] = useState({ theme: { mode: "light", palette: "palette1", monochrome: { enabled: false, color: "#255aee", shadeTo: "light", shadeIntensity: 0.65, }, }, series: [ { name: "Total materi", data: materi.map((item) => item.module.length), color: "#0f172a", }, ], chart: { type: "bar", height: 350, background: "#00000000", }, plotOptions: { bar: { horizontal: false, columnWidth: "55%", endingShape: "rounded", }, }, dataLabels: { enabled: false, }, stroke: { show: true, width: 2, colors: ["transparent"], }, xaxis: { categories: materi.map((item) => item.nama), }, fill: { opacity: 1, }, }); return (
} value={`+${module}`} /> } value={`+${user}`} />

Grafik Materi

); }; const CardDashboard = ({ title, icon, value }) => { return (

{title}

{value}

{icon}
); }; export default Dashboard;