@@ -40,7 +40,6 @@ import {
40
40
Star ,
41
41
Timer
42
42
} from "lucide-react" ;
43
- import { count } from "console" ;
44
43
45
44
ChartJS . register (
46
45
CategoryScale ,
@@ -88,7 +87,6 @@ export default function Dashboard() {
88
87
} ] ,
89
88
} ;
90
89
91
-
92
90
const processLeetCodeData = ( submissionCalendar : string ) => {
93
91
const parsedData = JSON . parse ( submissionCalendar ) ;
94
92
@@ -101,7 +99,7 @@ export default function Dashboard() {
101
99
return (
102
100
< div className = "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-8" >
103
101
{ /* Profile Header Card */ }
104
- < Card className = "bg-gradient-to-r from-blue-50 to-indigo-50 dark:from -gray-800 dark:to-gray-700 " >
102
+ < Card className = "bg-white dark:bg -gray-800 shadow-md rounded-lg " >
105
103
< CardContent className = "p-6" >
106
104
< div className = "flex flex-col md:flex-row items-center gap-6" >
107
105
< div className = "relative w-24 h-24" >
@@ -151,19 +149,19 @@ export default function Dashboard() {
151
149
152
150
< div className = "grid grid-cols-1 lg:grid-cols-3 gap-6" >
153
151
{ /* Activity Calendar Section */ }
154
- < Card className = "lg:col-span-2 overflow-hidden" >
152
+ < Card className = "lg:col-span-2 overflow-hidden shadow-md rounded-lg " >
155
153
< CardHeader className = "p-4 border-b" >
156
154
< div className = "flex items-center justify-between" >
157
155
< div className = "flex items-center gap-2" >
158
156
< Calendar className = "w-5 h-5 text-green-600" />
159
- < h3 className = "font-semibold" > Calendar</ h3 >
157
+ < h3 className = "font-semibold" > Contribution Calendar</ h3 >
160
158
</ div >
161
159
< span className = "text-sm text-gray-500" >
162
160
{ userDetails . submitStats . totalSubmissionNum [ 0 ] . count } total submissions
163
161
</ span >
164
162
</ div >
165
163
</ CardHeader >
166
- < CardContent className = "p-6" >
164
+ < CardContent className = "p-6" >
167
165
< CalendarHeatmap
168
166
values = { processLeetCodeData ( userDetails . submissionCalendar ) }
169
167
startDate = { new Date ( new Date ( ) . setFullYear ( new Date ( ) . getFullYear ( ) - 1 ) ) }
@@ -175,31 +173,31 @@ export default function Dashboard() {
175
173
return `color-scale-${ ( value . count ) } ` ;
176
174
} }
177
175
/>
178
- </ CardContent >
179
- < div className = "p-4 border-t justify-between" >
180
- < div className = "flex items-center justify-between" >
181
- < div className = "flex items-center gap-2" >
182
- < Badge className = "w-5 h-5 text-sky-600" />
183
- < h3 className = "font-semibold" > Badges</ h3 >
184
- </ div >
185
- < span className = "text-sm text-gray-500" >
186
- { ( userDetails . badges ) . length } total badges
187
- </ span >
176
+ </ CardContent >
177
+ < div className = "p-4 border-t" >
178
+ < div className = "flex items-center justify-between" >
179
+ < div className = "flex items-center gap-2" >
180
+ < Badge className = "w-5 h-5 text-sky-600" />
181
+ < h3 className = "font-semibold" > Badges</ h3 >
188
182
</ div >
189
- < CardContent className = "p-0" >
190
- < div className = "flex justify-center items-center gap-4 px-4 py-2" >
191
- { userDetails . badges . slice ( 0 , 5 ) . map ( ( badge , idx ) => (
192
- < div key = { idx } className = "flex flex-col items-center bg-gray-500 dark:bg-gray-800 rounded-lg p-3 min-w-[60px] max-w-[100px]" >
183
+ < span className = "text-sm text-gray-500" >
184
+ { ( userDetails . badges ) . length } total badges
185
+ </ span >
186
+ </ div >
187
+ < CardContent className = "p-0" >
188
+ < div className = "flex justify-center items-center gap-4 px-4 py-2" >
189
+ { userDetails . badges . slice ( 0 , 5 ) . map ( ( badge , idx ) => (
190
+ < div key = { idx } className = "flex flex-col items-center bg-gray-200 dark:bg-gray-700 rounded-lg p-3 min-w-[60px] max-w-[100px]" >
193
191
< img src = { badge . icon } alt = { `Badge ${ idx + 1 } ` } className = "w-full h-auto object-contain" />
194
192
</ div >
195
- ) ) }
196
- </ div >
197
- </ CardContent >
198
- </ div >
193
+ ) ) }
194
+ </ div >
195
+ </ CardContent >
196
+ </ div >
199
197
</ Card >
200
198
201
199
{ /* Recent Submissions Card */ }
202
- < Card className = "h-[400px] overflow-hidden" >
200
+ < Card className = "h-[400px] overflow-hidden shadow-md rounded-lg " >
203
201
< CardHeader className = "p-4 border-b" >
204
202
< div className = "flex items-center justify-between" >
205
203
< div className = "flex items-center gap-2" >
@@ -215,13 +213,13 @@ export default function Dashboard() {
215
213
href = { `https://leetcode.com/problems/${ submission . titleSlug } ` }
216
214
key = { idx }
217
215
target = "_blank"
218
- className = "flex items-center p-4 hover:bg-gray-50 transition-colors group"
216
+ className = "flex items-center p-4 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors group"
219
217
>
220
218
< div className = "flex-1 min-w-0" >
221
- < p className = "text-sm font-medium text-white -900 truncate group-hover:text-blue-600" >
219
+ < p className = "text-sm font-medium text-gray -900 dark:text-gray-100 truncate group-hover:text-blue-600" >
222
220
{ submission . title }
223
221
</ p >
224
- < p className = "text-xs text-gray-500 mt-1" >
222
+ < p className = "text-xs text-gray-500 dark:text-gray-400 mt-1" >
225
223
{ new Date ( Number ( submission . timestamp ) * 1000 ) . toISOString ( ) . split ( "T" ) [ 0 ] }
226
224
</ p >
227
225
</ div >
@@ -292,7 +290,7 @@ export default function Dashboard() {
292
290
</ div >
293
291
294
292
{ /* Problem Distribution Chart */ }
295
- < Card className = "bg-white dark:bg-gray-800" >
293
+ < Card className = "bg-white dark:bg-gray-800 shadow-md rounded-lg " >
296
294
< CardHeader className = "p-4 border-b" >
297
295
< div className = "flex items-center justify-between" >
298
296
< div className = "flex items-center gap-2" >
@@ -301,7 +299,7 @@ export default function Dashboard() {
301
299
</ div >
302
300
</ div >
303
301
</ CardHeader >
304
- < CardContent className = "p-6 flex justify-center" >
302
+ < CardContent className = "p-0 flex justify-center" >
305
303
< div className = "h-64 w-64" >
306
304
< Doughnut
307
305
data = { difficultyData }
@@ -414,7 +412,6 @@ function SocialLink({ href, icon }: { href?: string; icon: React.ReactNode }) {
414
412
) ;
415
413
}
416
414
417
-
418
415
function DashboardSkeleton ( ) {
419
416
return (
420
417
< div className = "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8" >
0 commit comments