MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / Dashboard

Function Dashboard

client/src/component/Dashboard.jsx:7–179  ·  view source on GitHub ↗
({ mode })

Source from the content-addressed store, hash-verified

5import PropTypes from "prop-types";
6
7const Dashboard = ({ mode }) => {
8 const isDarkMode = mode === 'dark';
9 const blogs = [
10 { id: 1, title: 'Understanding React', author: 'John Doe', category: 'Web Development' },
11 { id: 2, title: 'CSS Tips and Tricks', author: 'Jane Smith', category: 'Design' },
12 { id: 3, title: 'JavaScript Basics', author: 'Alice Johnson', category: 'Programming' },
13 ];
14
15 const handleDelete = (id) => {
16 console.log(`Blog with id ${id} deleted`);
17 };
18
19 return (
20 <div
21 className={`container mt-20 mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-4 ${
22 isDarkMode ? 'bg-gray-900 text-gray-100' : 'bg-white text-gray-800'
23 }`}
24 >
25 {/* Header */}
26 <header className="col-span-full">
27 <h1 className="text-[72px] font-bold mb-4">Dashboard</h1>
28 </header>
29
30 {/* Insights */}
31 <section className="col-span-full grid gap-6 md:grid-cols-2 lg:grid-cols-3">
32 <div
33 className={`shadow-md rounded-lg p-6 transition-shadow duration-300 hover:shadow-lg ${
34 isDarkMode ? 'bg-gray-800 text-white' : 'bg-white text-gray-800'
35 }`}
36 >
37 <div className="flex items-center justify-between">
38 <span className="material-symbols-sharp text-4xl bg-coral text-white p-2 rounded-full">
39 <PiEyesDuotone />
40 </span>
41 <div className="text-right">
42 <h3 className="text-lg font-medium">Total Views</h3>
43 <h1 className="text-2xl font-bold">100</h1>
44 </div>
45 </div>
46 <div className="mt-4 relative">
47 <div className="progress-circle relative w-16 h-16">
48 <svg className="absolute inset-0" viewBox="0 0 100 100">
49 <circle cx="50" cy="50" r="30" className="text-gray-200" strokeWidth="5" />
50 <circle
51 cx="50"
52 cy="50"
53 r="30"
54 className="text-blue-500"
55 strokeWidth="5"
56 strokeDasharray="150"
57 strokeDashoffset="calc(150 - (150 * 0.8))"
58 />
59 </svg>
60 <div className="absolute inset-0 flex items-center justify-center text-gray-800 text-sm">
61 80%
62 </div>
63 </div>
64 </div>

Callers

nothing calls this directly

Calls 1

handleDeleteFunction · 0.70

Tested by

no test coverage detected