Skip to content

Commit 8af78ab

Browse files
refactor: 🛠️ Update styling and layout for Dashboard components
1 parent d6f7dfe commit 8af78ab

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

app/dashboard/page.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ export default function Dashboard() {
118118
@{userDetails.username} • Rank #{userDetails.profile.ranking}
119119
</p>
120120
<div className="flex gap-4 justify-center sm:justify-start">
121-
<SocialLink href={userDetails.githubUrl} icon={<Github size={16} />} />
122-
<SocialLink href={userDetails.linkedinUrl} icon={<Linkedin size={16} />} />
123-
<SocialLink href={userDetails.twitterUrl || undefined} icon={<Twitter size={16} />} />
121+
<SocialLink href={userDetails.githubUrl} icon={<Github size={22} />} />
122+
<SocialLink href={userDetails.linkedinUrl} icon={<Linkedin size={22} />} />
123+
<SocialLink href={userDetails.twitterUrl || undefined} icon={<Twitter size={22} />} />
124124
</div>
125125
</div>
126126
<div className="grid grid-cols-3 gap-2 sm:gap-4 w-full sm:w-auto mt-4 sm:mt-0">
@@ -149,7 +149,7 @@ export default function Dashboard() {
149149

150150
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6">
151151
{/* Activity Calendar Section */}
152-
<Card className="md:col-span-2 overflow-hidden shadow-md rounded-lg">
152+
<Card className="md:col-span-2 overflow-hidden shadow-md rounded-lg bg-white dark:bg-gray-800">
153153
<CardHeader className="p-3 sm:p-4 border-b">
154154
<div className="flex items-center justify-between">
155155
<div className="flex items-center gap-2">
@@ -199,7 +199,7 @@ export default function Dashboard() {
199199
</Card>
200200

201201
{/* Recent Submissions Card */}
202-
<Card className="h-[350px] sm:h-[400px] overflow-hidden shadow-md rounded-lg">
202+
<Card className="h-[350px] sm:h-[400px] overflow-hidden shadow-md rounded-lg bg-white dark:bg-gray-800">
203203
<CardHeader className="p-3 sm:p-4 border-b">
204204
<div className="flex items-center justify-between">
205205
<div className="flex items-center gap-2">
@@ -233,7 +233,7 @@ export default function Dashboard() {
233233
</Card>
234234

235235
{/* Statistics Cards */}
236-
<div className="md:col-span-2">
236+
<div className="md:col-span-2 max-h-[400px] sm:max-h-[450px] lg:max-h-[500px] overflow-hidden">
237237
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6">
238238
<DetailCard
239239
title="Problem Solving Stats"
@@ -292,7 +292,7 @@ export default function Dashboard() {
292292
</div>
293293

294294
{/* Problem Distribution Chart */}
295-
<Card className="bg-white dark:bg-gray-800 shadow-md rounded-lg">
295+
<Card className="mb-4 bg-white dark:bg-gray-800 shadow-md rounded-lg">
296296
<CardHeader className="p-3 sm:p-4 border-b">
297297
<div className="flex items-center justify-between">
298298
<div className="flex items-center gap-2">
@@ -352,15 +352,15 @@ export default function Dashboard() {
352352

353353
function QuickStat({ icon, label, value, color = "blue" }: { icon: React.ReactNode; label: string; value: string | number; color?: "blue" | "yellow" | "purple" }) {
354354
const colorVariants = {
355-
blue: "bg-blue-50 dark:bg-blue-900/20",
356-
yellow: "bg-yellow-50 dark:bg-yellow-900/20",
357-
purple: "bg-purple-50 dark:bg-purple-900/20"
355+
blue: "bg-blue-100/80 dark:bg-blue-900/30",
356+
yellow: "bg-yellow-100/80 dark:bg-yellow-900/30",
357+
purple: "bg-purple-100/80 dark:bg-purple-900/30"
358358
};
359359

360360
return (
361-
<div className={`${colorVariants[color]} rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 transition-all duration-300 hover:scale-105 w-full`}>
362-
<div className="flex items-center gap-1 sm:gap-2">
363-
<div className="p-1 sm:p-1.5 lg:p-2 bg-white dark:bg-gray-800 rounded-full shadow-sm">
361+
<div className={`${colorVariants[color]} rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 transition-all duration-300 hover:scale-105 w-full flex items-stretch`}>
362+
<div className="flex items-center gap-1 sm:gap-2 w-full">
363+
<div className="p-1 sm:p-1.5 lg:p-2 bg-white dark:bg-gray-800 rounded-full shadow-sm flex-shrink-0">
364364
<div className="w-3 h-3 sm:w-4 sm:h-4 md:w-5 md:h-5">
365365
{icon}
366366
</div>
@@ -380,7 +380,7 @@ function QuickStat({ icon, label, value, color = "blue" }: { icon: React.ReactNo
380380

381381
function DetailCard({ title, icon, stats }: { title: string; icon: React.ReactNode; stats: any[] }) {
382382
return (
383-
<Card className="hover:shadow-lg transition-shadow duration-300">
383+
<Card className="hover:shadow-lg transition-shadow duration-300 bg-white dark:bg-gray-800 h-full">
384384
<CardHeader className="p-3 sm:p-4 border-b">
385385
<div className="flex items-center gap-2">
386386
{icon}
@@ -391,7 +391,7 @@ function DetailCard({ title, icon, stats }: { title: string; icon: React.ReactNo
391391
<div className="grid grid-cols-2 gap-2 sm:gap-4">
392392
{stats.map((stat, idx) => (
393393
<div key={idx}
394-
className="bg-gray-50 dark:bg-gray-800 p-2 sm:p-4 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"
394+
className="bg-gray-100/80 dark:bg-gray-700/50 p-2 sm:p-4 rounded-lg hover:bg-gray-200/80 dark:hover:bg-gray-700/80 transition-colors flex flex-col justify-between h-full"
395395
>
396396
<div className="flex items-center gap-1 sm:gap-2 mb-1 sm:mb-2">
397397
{stat.icon}

0 commit comments

Comments
 (0)