@@ -25,18 +25,16 @@ import {
25
25
Twitter ,
26
26
Trophy ,
27
27
TrendingUp ,
28
- CheckCircle ,
29
- Clock ,
30
28
Zap ,
31
- Calendar ,
32
29
Code ,
33
- AlertCircle ,
34
- LineChart ,
35
30
Target ,
36
31
Award ,
37
32
Hash
38
33
} from "lucide-react" ;
39
34
35
+ import LeetCodeCalendar from "leetcode-calendar" ;
36
+ import { exampleTheme } from "../../lib/leetcode-calendar-theme" ;
37
+
40
38
ChartJS . register (
41
39
CategoryScale ,
42
40
LinearScale ,
@@ -149,7 +147,13 @@ export default function Dashboard() {
149
147
< div className = "grid grid-cols-1 lg:grid-cols-3 gap-6" >
150
148
{ /* Leetcode calendar to show up here */ }
151
149
< div className = "lg:col-span-2" >
152
-
150
+ < LeetCodeCalendar username = "yashksaini"
151
+ blockSize = { 12 } // Optional: Size of each block in pixels (default: 15)
152
+ blockMargin = { 3 } // Optional: Margin between blocks in pixels (default: 5)
153
+ fontSize = { 11 } // Optional: Font size of the text within blocks (default: 16)
154
+ theme = { exampleTheme } // Optional: A custom theme object to style the calendar
155
+ style = { { maxWidth : '950px' } }
156
+ />
153
157
</ div >
154
158
155
159
{ /* Recent Submissions */ }
@@ -245,22 +249,21 @@ export default function Dashboard() {
245
249
) ;
246
250
}
247
251
248
- interface QuickStatProps {
252
+ function QuickStat ( { icon, label, value } :
253
+ {
249
254
icon : React . ReactNode ;
250
255
label : string ;
251
256
value : string | number ;
252
- }
253
-
254
- function QuickStat ( { icon , label , value } : QuickStatProps ) {
255
- return (
256
- < div className = "bg-gray-50 dark:bg-gray-800 rounded-lg px-3 py-2 text-center" >
257
- < div className = "flex items-center gap-1 text-gray-600 dark:text-gray-400" >
258
- { icon }
259
- < span className = "text-xs" > { label } </ span >
257
+ } ) {
258
+ return (
259
+ < div className = "flex items-center space-x-3 bg-secondary/50 rounded-lg p-4 hover:bg-secondary/70 transition-colors" >
260
+ < div className = "p-2 bg-background rounded-full" > { icon } </ div >
261
+ < div >
262
+ < div className = "text-2xl font-bold" > { value . toLocaleString ( ) } </ div >
263
+ < div className = "text-sm font-medium" > { label } </ div >
264
+ </ div >
260
265
</ div >
261
- < div className = "font-semibold" > { value } </ div >
262
- </ div >
263
- ) ;
266
+ ) ;
264
267
}
265
268
266
269
interface DetailStats {
@@ -279,7 +282,7 @@ function DetailCard({ title, icon, stats }: { title: string; icon: React.ReactNo
279
282
</ CardHeader >
280
283
< CardContent className = "p-4" >
281
284
< div className = "grid grid-cols-2 gap-4" >
282
- { stats . map ( ( stat : { label : string | number | bigint | boolean | React . ReactElement < unknown , string | React . JSXElementConstructor < any > > | Iterable < React . ReactNode > | React . ReactPortal | Promise < string | number | bigint | boolean | React . ReactPortal | React . ReactElement < unknown , string | React . JSXElementConstructor < any > > | Iterable < React . ReactNode > | null | undefined > | null | undefined ; value : string | number | bigint | boolean | React . ReactElement < unknown , string | React . JSXElementConstructor < any > > | Iterable < React . ReactNode > | React . ReactPortal | Promise < string | number | bigint | boolean | React . ReactPortal | React . ReactElement < unknown , string | React . JSXElementConstructor < any > > | Iterable < React . ReactNode > | null | undefined > | null | undefined ; } , idx : React . Key | null | undefined ) => (
285
+ { stats . map ( ( stat , idx ) => (
283
286
< div key = { idx } className = "bg-gray-50 dark:bg-gray-800 p-3 rounded-lg" >
284
287
< div className = "text-sm text-gray-600 dark:text-gray-400" > { stat . label } </ div >
285
288
< div className = "text-lg font-semibold" > { stat . value } </ div >
0 commit comments