From b550992e0f3a6836f5240597f054e043b32a1db4 Mon Sep 17 00:00:00 2001 From: Shambavi Date: Wed, 27 May 2026 13:01:24 +0530 Subject: [PATCH 1/4] feat(dashboard): add AIInsights loading skeleton --- app/(root)/dashboard/loading.tsx | 3 ++- components/dashboard/AIInsightsSkeleton.tsx | 26 +++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 components/dashboard/AIInsightsSkeleton.tsx diff --git a/app/(root)/dashboard/loading.tsx b/app/(root)/dashboard/loading.tsx index ef9d24dd..11e26173 100644 --- a/app/(root)/dashboard/loading.tsx +++ b/app/(root)/dashboard/loading.tsx @@ -1,5 +1,6 @@ import StatsCardSkeleton from '@/components/dashboard/StatsCardSkeleton'; import AchievementsSkeleton from '@/components/dashboard/AchievementsSkeleton'; +import AIInsightsSkeleton from '@/components/dashboard/AIInsightsSkeleton'; export default function DashboardLoading() { return ( @@ -40,7 +41,7 @@ export default function DashboardLoading() {
-
+
diff --git a/components/dashboard/AIInsightsSkeleton.tsx b/components/dashboard/AIInsightsSkeleton.tsx new file mode 100644 index 00000000..e9e5d46d --- /dev/null +++ b/components/dashboard/AIInsightsSkeleton.tsx @@ -0,0 +1,26 @@ +export default function AIInsightsSkeleton() { + return ( +
+
+
+
+
+ +
+ {[...Array(3)].map((_, i) => ( +
+
+ +
+
+
+
+
+ ))} +
+
+ ); +} From a6efaf3e90ff1834581a06b9f5326bf4ae19f779 Mon Sep 17 00:00:00 2001 From: Shambavi Date: Thu, 28 May 2026 19:35:45 +0530 Subject: [PATCH 2/4] style(dashboard): improve dark skeleton loading UI --- app/(root)/dashboard/loading.tsx | 4 +- app/globals.css | 1 + components/dashboard/AIInsights.tsx | 66 +++++++-------------- components/dashboard/AIInsightsSkeleton.tsx | 22 ++++--- components/dashboard/StatsCardSkeleton.tsx | 2 +- 5 files changed, 40 insertions(+), 55 deletions(-) diff --git a/app/(root)/dashboard/loading.tsx b/app/(root)/dashboard/loading.tsx index 11e26173..c75d3c34 100644 --- a/app/(root)/dashboard/loading.tsx +++ b/app/(root)/dashboard/loading.tsx @@ -4,7 +4,7 @@ import AIInsightsSkeleton from '@/components/dashboard/AIInsightsSkeleton'; export default function DashboardLoading() { return ( -
+
{/* Left Sidebar Skeleton */}
@@ -37,7 +37,7 @@ export default function DashboardLoading() {
{/* Right Sidebar Skeleton */} -
+
diff --git a/app/globals.css b/app/globals.css index 0dec0630..7af8ecdc 100644 --- a/app/globals.css +++ b/app/globals.css @@ -53,6 +53,7 @@ } .shimmer { + background-color: #1a1a1a; /* base dark gray */ background: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0%, diff --git a/components/dashboard/AIInsights.tsx b/components/dashboard/AIInsights.tsx index 3203a8ab..e8370d3e 100644 --- a/components/dashboard/AIInsights.tsx +++ b/components/dashboard/AIInsights.tsx @@ -1,50 +1,30 @@ -'use client'; - -import { motion } from 'framer-motion'; -import { Sparkles, Moon, Sun, Zap, Calendar, Flame, Code, Star, LucideIcon } from 'lucide-react'; -import { AIInsight } from '@/types/dashboard'; - -const iconMap: Record = { Moon, Sun, Zap, Calendar, Flame, Code, Star }; - -export default function AIInsights({ insights }: { insights: AIInsight[] }) { +export default function AIInsightsSkeleton() { return ( - +
+ {/* Header */}
- -

- AI Insights -

+
+
-
- {insights.map((insight, i) => { - const Icon = iconMap[insight.icon] || Sparkles; - return ( - - -

- {insight.text} -

-
- ); - })} + {/* Insight Rows */} +
+ {[...Array(3)].map((_, i) => ( +
+ {/* Icon */} +
+ + {/* Text */} +
+
+
+
+
+ ))}
- +
); } diff --git a/components/dashboard/AIInsightsSkeleton.tsx b/components/dashboard/AIInsightsSkeleton.tsx index e9e5d46d..ac3b9026 100644 --- a/components/dashboard/AIInsightsSkeleton.tsx +++ b/components/dashboard/AIInsightsSkeleton.tsx @@ -1,22 +1,26 @@ export default function AIInsightsSkeleton() { return ( -
-
-
-
+
+ {/* Header */} +
+
+
-
+ {/* Insight Cards */} +
{[...Array(3)].map((_, i) => (
-
+ {/* Icon */} +
+ {/* Text */}
-
-
+
+
))} diff --git a/components/dashboard/StatsCardSkeleton.tsx b/components/dashboard/StatsCardSkeleton.tsx index b18ce42d..614529c1 100644 --- a/components/dashboard/StatsCardSkeleton.tsx +++ b/components/dashboard/StatsCardSkeleton.tsx @@ -5,7 +5,7 @@ export default function StatsCardSkeleton() { const heights = [24, 32, 18, 45, 38, 52, 28, 42, 35, 48, 30, 22]; return ( -
+
From fb515c20c9eea37503f334ec7f77a4bcd8442acb Mon Sep 17 00:00:00 2001 From: Shambavi Date: Thu, 28 May 2026 22:06:04 +0530 Subject: [PATCH 3/4] fix(dashboard): restore AIInsights component --- components/dashboard/AIInsights.tsx | 66 ++++++++++++++------- components/dashboard/AIInsightsSkeleton.tsx | 18 +++--- 2 files changed, 53 insertions(+), 31 deletions(-) diff --git a/components/dashboard/AIInsights.tsx b/components/dashboard/AIInsights.tsx index e8370d3e..1793b483 100644 --- a/components/dashboard/AIInsights.tsx +++ b/components/dashboard/AIInsights.tsx @@ -1,30 +1,52 @@ -export default function AIInsightsSkeleton() { +'use client'; + +import { motion } from 'framer-motion'; +import { Sparkles, Moon, Sun, Zap, Calendar, Flame, Code, Star, LucideIcon } from 'lucide-react'; +import { AIInsight } from '@/types/dashboard'; + +const iconMap: Record = { Moon, Sun, Zap, Calendar, Flame, Code, Star }; + +export default function AIInsights({ insights }: { insights: AIInsight[] }) { return ( -
- {/* Header */} +
-
-
+ +

+ AI Insights +

- {/* Insight Rows */}
- {[...Array(3)].map((_, i) => ( -
- {/* Icon */} -
+ {insights.map((insight, i) => { + const Icon = iconMap[insight.icon] || Sparkles; + + return ( + + - {/* Text */} -
-
-
-
-
- ))} +

+ {insight.text} +

+ + ); + })}
-
+ ); -} +} \ No newline at end of file diff --git a/components/dashboard/AIInsightsSkeleton.tsx b/components/dashboard/AIInsightsSkeleton.tsx index ac3b9026..e8370d3e 100644 --- a/components/dashboard/AIInsightsSkeleton.tsx +++ b/components/dashboard/AIInsightsSkeleton.tsx @@ -1,26 +1,26 @@ export default function AIInsightsSkeleton() { return ( -
+
{/* Header */} -
-
-
+
+
+
- {/* Insight Cards */} + {/* Insight Rows */}
{[...Array(3)].map((_, i) => (
{/* Icon */} -
+
{/* Text */}
-
-
+
+
))} From 39311058d3a7177c53e8a1771ebd419f603fd9ba Mon Sep 17 00:00:00 2001 From: Shambavi Date: Thu, 28 May 2026 22:08:54 +0530 Subject: [PATCH 4/4] style(dashboard): format AI insights components --- components/dashboard/AIInsights.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dashboard/AIInsights.tsx b/components/dashboard/AIInsights.tsx index 1793b483..2f03ba92 100644 --- a/components/dashboard/AIInsights.tsx +++ b/components/dashboard/AIInsights.tsx @@ -49,4 +49,4 @@ export default function AIInsights({ insights }: { insights: AIInsight[] }) {
); -} \ No newline at end of file +}