aki-008 commited on
Commit
addbdb1
·
1 Parent(s): 4a0902b

chore: dashboard ui update

Browse files
Frontend/src/components/dashboard/FeedBackScore.tsx CHANGED
@@ -9,9 +9,10 @@ interface Props {
9
  }
10
 
11
  const ScoreCard = ({ label, value }: any) => (
12
- <div className="p-4 text-center bg-gray-100 rounded-xl">
13
- <p className="text-3xl font-bold text-black">{value}%</p>
14
- <p className="text-gray-600">{label}</p>
 
15
  </div>
16
  );
17
 
@@ -23,22 +24,30 @@ const FeedbackScore: React.FC<Props> = ({
23
  improvements,
24
  }) => {
25
  return (
26
- <div className="bg-white p-5 shadow rounded-xl">
27
- <h3 className="text-xl font-bold mb-3 text-black">AI Feedback Summary</h3>
28
-
29
- <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
30
  <ScoreCard label="Confidence" value={confidence} />
31
  <ScoreCard label="Clarity" value={clarity} />
32
- <ScoreCard label="Technical Accuracy" value={accuracy} />
33
  <ScoreCard label="Speed" value={speed} />
34
  </div>
35
 
36
- <h4 className="text-lg font-semibold mt-5 text-black">Suggested Improvements</h4>
37
- <ul className="list-disc pl-5 text-blue-600">
38
- {improvements.map((item, i) => (
39
- <li key={i}>{item}</li>
40
- ))}
41
- </ul>
 
 
 
 
 
 
 
 
 
42
  </div>
43
  );
44
  };
 
9
  }
10
 
11
  const ScoreCard = ({ label, value }: any) => (
12
+ // Updated: Transparent/Darker background for individual score items
13
+ <div className="p-4 text-center bg-[#434E78]/50 border border-white/5 rounded-xl">
14
+ <p className="text-3xl font-bold text-[#F7E396]">{value}%</p>
15
+ <p className="text-gray-300 text-sm mt-1">{label}</p>
16
  </div>
17
  );
18
 
 
24
  improvements,
25
  }) => {
26
  return (
27
+ // Updated: Removed bg-white, using transparent container
28
+ <div className="w-full">
29
+ <div className="grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6">
 
30
  <ScoreCard label="Confidence" value={confidence} />
31
  <ScoreCard label="Clarity" value={clarity} />
32
+ <ScoreCard label="Accuracy" value={accuracy} />
33
  <ScoreCard label="Speed" value={speed} />
34
  </div>
35
 
36
+ <div className="bg-[#434E78]/30 p-4 rounded-xl border border-white/5">
37
+ <h4 className="text-sm font-semibold text-white mb-2 uppercase tracking-wide opacity-80">
38
+ Suggested Improvements
39
+ </h4>
40
+ <ul className="space-y-1">
41
+ {improvements.map((item, i) => (
42
+ <li
43
+ key={i}
44
+ className="text-gray-200 text-sm flex items-start gap-2"
45
+ >
46
+ <span className="text-[#E97F4A] mt-1">•</span> {item}
47
+ </li>
48
+ ))}
49
+ </ul>
50
+ </div>
51
  </div>
52
  );
53
  };
Frontend/src/components/dashboard/SkillRadarChart.tsx CHANGED
@@ -1,27 +1,45 @@
1
  import {
2
- Radar, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, ResponsiveContainer
 
 
 
 
 
3
  } from "recharts";
4
 
5
  const SkillRadarChart = ({ data }: { data: any[] }) => (
6
- <div className="bg-white p-5 shadow rounded-xl">
7
- <h3 className="text-xl font-bold mb-3 text-black">Skill Strength Chart</h3>
 
 
 
 
8
 
9
- <div className="w-full h-80">
10
- <ResponsiveContainer>
11
- <RadarChart cx="50%" cy="50%" outerRadius="70%" data={data}>
12
- <PolarGrid />
13
- <PolarAngleAxis dataKey="skill" />
14
- <PolarRadiusAxis angle={30} domain={[0, 100]} />
15
- <Radar
16
- name="Skill Level"
17
- dataKey="value"
18
- stroke="#1170d6"
19
- fill="#1170d6"
20
- fillOpacity={0.4}
21
- />
22
- </RadarChart>
23
- </ResponsiveContainer>
24
- </div>
 
 
 
 
 
 
 
 
 
25
  </div>
26
  );
27
 
 
1
  import {
2
+ Radar,
3
+ RadarChart,
4
+ PolarGrid,
5
+ PolarAngleAxis,
6
+ PolarRadiusAxis,
7
+ ResponsiveContainer,
8
  } from "recharts";
9
 
10
  const SkillRadarChart = ({ data }: { data: any[] }) => (
11
+ // Updated: Transparent background
12
+ <div className="w-full h-full flex items-center justify-center">
13
+ <ResponsiveContainer width="100%" height="100%">
14
+ <RadarChart cx="50%" cy="50%" outerRadius="70%" data={data}>
15
+ {/* Grid lines: lighter for dark theme */}
16
+ <PolarGrid stroke="#e5e7eb" strokeOpacity={0.2} />
17
 
18
+ {/* Labels: White text */}
19
+ <PolarAngleAxis
20
+ dataKey="skill"
21
+ tick={{ fill: "#ffffff", fontSize: 12, fontWeight: 500 }}
22
+ />
23
+
24
+ {/* Radius Axis: Hidden or subtle */}
25
+ <PolarRadiusAxis
26
+ angle={30}
27
+ domain={[0, 100]}
28
+ tick={false}
29
+ axisLine={false}
30
+ />
31
+
32
+ {/* The Radar Shape: Highlight Yellow with opacity */}
33
+ <Radar
34
+ name="Skill Level"
35
+ dataKey="value"
36
+ stroke="#F7E396"
37
+ strokeWidth={2}
38
+ fill="#F7E396"
39
+ fillOpacity={0.4}
40
+ />
41
+ </RadarChart>
42
+ </ResponsiveContainer>
43
  </div>
44
  );
45
 
Frontend/src/components/dashboard/YearlyStreak.tsx CHANGED
@@ -6,13 +6,17 @@ interface StreakData {
6
  month: string;
7
  }
8
 
 
 
 
9
  const getColor = (count: number) => {
10
- if (count === 0) return "#2e2e2e";
11
- if (count === 1) return "#9be9f8";
12
- if (count === 2) return "#40c4f3";
13
- if (count === 3) return "#30a1c4";
14
- return "#216e9c";
15
  };
 
16
  const YearlyStreak = ({ data }: { data: StreakData[] }) => {
17
  const totalSubmissions = data.reduce((a, b) => a + b.count, 0);
18
  const activeDays = data.filter((d) => d.count > 0).length;
@@ -35,26 +39,33 @@ const YearlyStreak = ({ data }: { data: StreakData[] }) => {
35
  }, {});
36
 
37
  return (
38
- <div className="bg-gray-900 p-6 rounded-xl text-white shadow-xl">
39
- <div className="flex justify-between mb-4">
40
- <h3 className="text-xl font-semibold">
41
- {totalSubmissions} Hour Platform Activities This Year
 
42
  </h3>
43
 
44
- <div className="flex gap-6 text-gray-300">
45
- <p>Total active days: <span className="text-white">{activeDays}</span></p>
46
- <p>Max streak: <span className="text-white">{maxStreak}</span></p>
 
 
 
 
 
 
47
  </div>
48
  </div>
49
 
50
- <div className="flex">
51
  {Object.keys(weeks).map((weekIndex) => (
52
- <div key={weekIndex} className="flex flex-col mr-1">
53
  {weeks[weekIndex].map((day: StreakData) => (
54
  <div
55
  key={day.date}
56
  title={`${day.date} — ${day.count} tasks`}
57
- className="w-4 h-4 rounded-sm mb-1"
58
  style={{ backgroundColor: getColor(day.count) }}
59
  />
60
  ))}
@@ -62,12 +73,12 @@ const YearlyStreak = ({ data }: { data: StreakData[] }) => {
62
  ))}
63
  </div>
64
 
65
- <div className="flex mt-3 text-gray-400 text-xs">
66
  {Object.keys(weeks).map((weekIndex) => {
67
  const firstDay = weeks[weekIndex][0];
68
  const showLabel = firstDay.date.endsWith("01");
69
  return (
70
- <div key={weekIndex} className="w-4 mx-[2px]">
71
  {showLabel && <span>{firstDay.month}</span>}
72
  </div>
73
  );
 
6
  month: string;
7
  }
8
 
9
+ // Updated Colors:
10
+ // Empty: Dark Blue (#434E78)
11
+ // Low -> High: Light Blue -> Yellow -> Orange
12
  const getColor = (count: number) => {
13
+ if (count === 0) return "#434E78"; // Empty state (matches page bg)
14
+ if (count === 1) return "#607B8F"; // Low activity
15
+ if (count === 2) return "#F7E396"; // Medium activity
16
+ if (count === 3) return "#E97F4A"; // High activity
17
+ return "#E97F4A";
18
  };
19
+
20
  const YearlyStreak = ({ data }: { data: StreakData[] }) => {
21
  const totalSubmissions = data.reduce((a, b) => a + b.count, 0);
22
  const activeDays = data.filter((d) => d.count > 0).length;
 
39
  }, {});
40
 
41
  return (
42
+ // Transparent container, relying on parent card
43
+ <div className="w-full text-white">
44
+ <div className="flex justify-between mb-6">
45
+ <h3 className="text-sm font-medium text-gray-300">
46
+ {totalSubmissions} activities in the last year
47
  </h3>
48
 
49
+ <div className="flex gap-6 text-sm text-gray-300">
50
+ <p>
51
+ Total Active Days:{" "}
52
+ <span className="text-[#F7E396] font-bold">{activeDays}</span>
53
+ </p>
54
+ <p>
55
+ Longest Streak:{" "}
56
+ <span className="text-[#F7E396] font-bold">{maxStreak}</span>
57
+ </p>
58
  </div>
59
  </div>
60
 
61
+ <div className="flex overflow-x-auto custom-scrollbar pb-2">
62
  {Object.keys(weeks).map((weekIndex) => (
63
+ <div key={weekIndex} className="flex flex-col mr-1 gap-1">
64
  {weeks[weekIndex].map((day: StreakData) => (
65
  <div
66
  key={day.date}
67
  title={`${day.date} — ${day.count} tasks`}
68
+ className="w-3 h-3 rounded-[2px] transition-all hover:ring-1 hover:ring-white"
69
  style={{ backgroundColor: getColor(day.count) }}
70
  />
71
  ))}
 
73
  ))}
74
  </div>
75
 
76
+ <div className="flex mt-2 text-gray-400 text-xs">
77
  {Object.keys(weeks).map((weekIndex) => {
78
  const firstDay = weeks[weekIndex][0];
79
  const showLabel = firstDay.date.endsWith("01");
80
  return (
81
+ <div key={weekIndex} className="w-3 mr-1">
82
  {showLabel && <span>{firstDay.month}</span>}
83
  </div>
84
  );
Frontend/src/pages/dashboard.tsx CHANGED
@@ -1,14 +1,24 @@
 
1
  import YearlyStreak from "../components/dashboard/YearlyStreak";
2
  import FeedbackScore from "../components/dashboard/FeedBackScore";
3
  import SkillRadarChart from "../components/dashboard/SkillRadarChart";
4
- import WeakAreaBanner from "../components/dashboard/WeakAreaBanner";
5
- import InterviewPlayback from "../components/dashboard/InterviewPlayback";
6
  import { generateYearlyStreakData } from "../utils/generateYearlyStreakData";
7
- import { useAuth } from "../components/context/AuthContext"; // Import AuthContext
 
 
 
 
 
 
 
 
 
8
 
9
  const Dashboard = () => {
10
- const { username } = useAuth(); // Get dynamic username
11
  const streakData = generateYearlyStreakData();
 
 
12
  const radarData = [
13
  { skill: "DSA", value: 70 },
14
  { skill: "System Design", value: 60 },
@@ -17,88 +27,207 @@ const Dashboard = () => {
17
  { skill: "Accuracy", value: 68 },
18
  { skill: "Time Mgmt", value: 80 },
19
  ];
20
- const weakTopic = "Dynamic Programming";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  return (
23
- // Updated background to match the new dark blue theme
24
- <div className="px-6 py-8 space-y-10 min-h-screen text-gray-100 bg-[#434E78] font-OpenSans">
25
  {/* ----------- HEADER SECTION ----------- */}
26
- <div className="flex flex-col md:flex-row md:items-center justify-between mb-4">
27
- {/* Replaced Hardcoded Name with {username} */}
28
- <h1 className="text-3xl lg:text-4xl font-extrabold text-white tracking-tight">
29
- 👋 Welcome back,{" "}
30
- <span className="text-[#F7E396]">{username || "User"}</span>
31
- </h1>
32
-
33
- <div className="flex items-center space-x-3 mt-4 md:mt-0">
34
- {/* Updated Button to match new Highlight (#F7E396) theme */}
35
- <button className="px-6 py-2 bg-[#F7E396] text-[#434E78] rounded-lg shadow-lg hover:bg-[#E97F4A] hover:text-white transition-all duration-300 ease-in-out font-bold">
36
- Start Interview
37
- </button>
38
  </div>
 
 
 
 
 
39
  </div>
40
 
41
- {/* ----------- GRID MAIN LAYOUT ----------- */}
42
  <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
43
- {/* LEFT PANEL (Feedback Score) */}
44
- <div className="space-y-6 col-span-1">
45
- {/* Updated Card Background to Secondary Blue (#607B8F) */}
46
- <div className="bg-[#607B8F] rounded-xl shadow-lg p-6 border border-white/10 h-full">
47
- <h2 className="text-xl font-bold mb-4 text-white">
48
- AI Feedback Score
49
  </h2>
50
- <FeedbackScore
51
- confidence={78}
52
- clarity={82}
53
- accuracy={70}
54
- speed={65}
55
- improvements={[
56
- "Improve explanation clarity",
57
- "Practice more DP problems",
58
- "Reduce filler words in answers",
59
- ]}
60
- />
61
  </div>
 
 
 
 
 
 
 
 
 
 
 
62
  </div>
63
 
64
- {/* RIGHT PANEL (Skill Chart) */}
65
- <div className="space-y-6 col-span-1">
66
- <div className="bg-[#607B8F] rounded-xl shadow-lg p-6 border border-white/10 h-full">
67
- <h2 className="text-xl font-bold mb-4 text-white">
68
- Skill Strength Chart
69
  </h2>
 
 
70
  <SkillRadarChart data={radarData} />
71
  </div>
72
  </div>
73
  </div>
74
 
75
- {/* ----------- MIDDLE ROW ----------- */}
76
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
77
- <div className="bg-[#607B8F] rounded-xl shadow-lg p-6 border border-white/10 lg:col-span-2">
78
- <h2 className="text-xl font-bold mb-4 text-white">
79
- Interview Playback AI Feedback
 
80
  </h2>
81
- <InterviewPlayback
82
- audioUrl="https://example.com/audio.mp3"
83
- transcript={`Interviewer: Explain polymorphism.\nYou: Polymorphism means...`}
84
- highlights={[
85
- "Answer lacked real-world example",
86
- "Need more clarity in describing LLD concepts",
87
- "Example Interview Playback",
88
- ]}
89
- />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  </div>
91
 
92
- <div className="bg-[#607B8F] rounded-xl shadow-lg p-5 border border-white/10 col-span-1 flex-col items-center justify-center">
93
- <h2 className="text-xl font-bold mb-4 text-white">WeakAreaBanner</h2>
94
- <WeakAreaBanner topic={weakTopic} />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  </div>
96
  </div>
97
 
98
- {/* ----------- BOTTOM ROW ----------- */}
99
- <div className="bg-[#607B8F] rounded-xl shadow-lg p-6 border border-white/10">
100
- <h2 className="text-xl font-bold mb-3 text-white">Yearly Streak</h2>
101
- <YearlyStreak data={streakData} />
 
 
 
 
 
102
  </div>
103
  </div>
104
  );
 
1
+ import React from "react";
2
  import YearlyStreak from "../components/dashboard/YearlyStreak";
3
  import FeedbackScore from "../components/dashboard/FeedBackScore";
4
  import SkillRadarChart from "../components/dashboard/SkillRadarChart";
 
 
5
  import { generateYearlyStreakData } from "../utils/generateYearlyStreakData";
6
+ import { useAuth } from "../components/context/AuthContext";
7
+ import {
8
+ PlayCircle,
9
+ FileText,
10
+ CheckCircle,
11
+ Brain,
12
+ TrendingUp,
13
+ AlertCircle,
14
+ Clock,
15
+ } from "lucide-react";
16
 
17
  const Dashboard = () => {
18
+ const { username } = useAuth();
19
  const streakData = generateYearlyStreakData();
20
+
21
+ // Mock Data for Charts
22
  const radarData = [
23
  { skill: "DSA", value: 70 },
24
  { skill: "System Design", value: 60 },
 
27
  { skill: "Accuracy", value: 68 },
28
  { skill: "Time Mgmt", value: 80 },
29
  ];
30
+
31
+ // Mock Data for Recent Activity
32
+ const recentActivities = [
33
+ {
34
+ id: 1,
35
+ type: "interview",
36
+ title: "React Native Interview",
37
+ date: "Today, 10:23 AM",
38
+ score: "85%",
39
+ icon: <PlayCircle size={20} />,
40
+ },
41
+ {
42
+ id: 2,
43
+ type: "quiz",
44
+ title: "Frontend Basics MCQ",
45
+ date: "Yesterday",
46
+ score: "92%",
47
+ icon: <CheckCircle size={20} />,
48
+ },
49
+ {
50
+ id: 3,
51
+ type: "note",
52
+ title: "System_Design_Notes.pdf",
53
+ date: "2 days ago",
54
+ status: "Uploaded",
55
+ icon: <FileText size={20} />,
56
+ },
57
+ ];
58
+
59
+ // Mock Data for Quiz Stats
60
+ const quizStats = {
61
+ completed: 15,
62
+ accuracy: 72,
63
+ weakestTopic: "Dynamic Programming",
64
+ strongestTopic: "React Hooks",
65
+ };
66
 
67
  return (
68
+ // 1. Page Background: #434E78
69
+ <div className="px-6 py-8 space-y-8 min-h-screen text-white bg-[#434E78] font-sans">
70
  {/* ----------- HEADER SECTION ----------- */}
71
+ <div className="flex flex-col md:flex-row md:items-center justify-between gap-4">
72
+ <div>
73
+ <h1 className="text-3xl lg:text-4xl font-bold font-handwriting tracking-wide">
74
+ Welcome back,{" "}
75
+ <span className="text-[#F7E396]">{username || "User"}!</span>
76
+ </h1>
77
+ <p className="text-[#607B8F] text-gray-300 mt-1">
78
+ Track your progress and stay consistent.
79
+ </p>
 
 
 
80
  </div>
81
+
82
+ <button className="px-6 py-3 bg-[#F7E396] text-[#434E78] rounded-xl shadow-lg hover:bg-[#E97F4A] hover:text-white transition-all duration-300 font-bold flex items-center gap-2 transform hover:-translate-y-1">
83
+ <PlayCircle size={20} />
84
+ Start New Interview
85
+ </button>
86
  </div>
87
 
88
+ {/* ----------- TOP ROW: Performance & Skills ----------- */}
89
  <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
90
+ {/* 1. AI Feedback Score */}
91
+ <div className="bg-[#607B8F] rounded-2xl shadow-xl p-6 border border-white/10 flex flex-col justify-between">
92
+ <div className="flex items-center justify-between mb-4">
93
+ <h2 className="text-xl font-bold text-white flex items-center gap-2">
94
+ <Brain className="text-[#F7E396]" size={24} /> AI Feedback Score
 
95
  </h2>
96
+ <span className="text-xs font-mono text-[#F7E396] bg-[#434E78] px-2 py-1 rounded">
97
+ AVG
98
+ </span>
 
 
 
 
 
 
 
 
99
  </div>
100
+ {/* Passed prop to handle transparent background in child */}
101
+ <FeedbackScore
102
+ confidence={78}
103
+ clarity={82}
104
+ accuracy={70}
105
+ speed={65}
106
+ improvements={[
107
+ "Improve explanation clarity",
108
+ "Practice more DP problems",
109
+ ]}
110
+ />
111
  </div>
112
 
113
+ {/* 2. Skill Radar Chart */}
114
+ <div className="bg-[#607B8F] rounded-2xl shadow-xl p-6 border border-white/10">
115
+ <div className="flex items-center justify-between mb-2">
116
+ <h2 className="text-xl font-bold text-white flex items-center gap-2">
117
+ <TrendingUp className="text-[#F7E396]" size={24} /> Skill Analysis
118
  </h2>
119
+ </div>
120
+ <div className="h-64 w-full">
121
  <SkillRadarChart data={radarData} />
122
  </div>
123
  </div>
124
  </div>
125
 
126
+ {/* ----------- MIDDLE ROW: Activity & Quiz Stats ----------- */}
127
+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
128
+ {/* 3. Recent Activity List */}
129
+ <div className="bg-[#607B8F] rounded-2xl shadow-xl p-6 border border-white/10">
130
+ <h2 className="text-xl font-bold text-white mb-6 flex items-center gap-2">
131
+ <Clock className="text-[#F7E396]" size={24} /> Recent Activity
132
  </h2>
133
+
134
+ <div className="space-y-4">
135
+ {recentActivities.map((item) => (
136
+ <div
137
+ key={item.id}
138
+ className="flex items-center justify-between p-4 bg-[#434E78]/50 rounded-xl border border-white/5 hover:border-[#F7E396]/50 transition cursor-pointer"
139
+ >
140
+ <div className="flex items-center gap-4">
141
+ <div
142
+ className={`p-3 rounded-full ${
143
+ item.type === "interview"
144
+ ? "bg-blue-500/20 text-blue-300"
145
+ : item.type === "quiz"
146
+ ? "bg-green-500/20 text-green-300"
147
+ : "bg-purple-500/20 text-purple-300"
148
+ }`}
149
+ >
150
+ {item.icon}
151
+ </div>
152
+ <div>
153
+ <h4 className="font-semibold text-white">{item.title}</h4>
154
+ <p className="text-xs text-gray-300">{item.date}</p>
155
+ </div>
156
+ </div>
157
+ <div className="text-right">
158
+ {item.score ? (
159
+ <span className="text-lg font-bold text-[#F7E396]">
160
+ {item.score}
161
+ </span>
162
+ ) : (
163
+ <span className="text-xs bg-white/10 px-2 py-1 rounded text-gray-300">
164
+ {item.status}
165
+ </span>
166
+ )}
167
+ </div>
168
+ </div>
169
+ ))}
170
+ </div>
171
  </div>
172
 
173
+ {/* 4. Quiz & Knowledge Metrics */}
174
+ <div className="bg-[#607B8F] rounded-2xl shadow-xl p-6 border border-white/10 flex flex-col justify-between">
175
+ <div>
176
+ <h2 className="text-xl font-bold text-white mb-6 flex items-center gap-2">
177
+ <CheckCircle className="text-[#F7E396]" size={24} /> Quiz &
178
+ Knowledge
179
+ </h2>
180
+
181
+ <div className="grid grid-cols-2 gap-4 mb-6">
182
+ <div className="p-4 bg-[#434E78]/50 rounded-xl border border-white/5">
183
+ <p className="text-gray-300 text-sm">Quizzes Completed</p>
184
+ <p className="text-3xl font-bold text-white mt-1">
185
+ {quizStats.completed}
186
+ </p>
187
+ </div>
188
+ <div className="p-4 bg-[#434E78]/50 rounded-xl border border-white/5">
189
+ <p className="text-gray-300 text-sm">Avg. Accuracy</p>
190
+ <p className="text-3xl font-bold text-[#F7E396] mt-1">
191
+ {quizStats.accuracy}%
192
+ </p>
193
+ </div>
194
+ </div>
195
+
196
+ <div className="space-y-3">
197
+ <div className="flex justify-between items-center p-3 bg-red-500/10 border border-red-500/20 rounded-lg">
198
+ <span className="text-sm text-red-200 flex items-center gap-2">
199
+ <AlertCircle size={16} /> Weakest Topic
200
+ </span>
201
+ <span className="font-bold text-red-100">
202
+ {quizStats.weakestTopic}
203
+ </span>
204
+ </div>
205
+ <div className="flex justify-between items-center p-3 bg-green-500/10 border border-green-500/20 rounded-lg">
206
+ <span className="text-sm text-green-200 flex items-center gap-2">
207
+ <TrendingUp size={16} /> Strongest Topic
208
+ </span>
209
+ <span className="font-bold text-green-100">
210
+ {quizStats.strongestTopic}
211
+ </span>
212
+ </div>
213
+ </div>
214
+ </div>
215
+
216
+ <button className="w-full mt-6 py-3 rounded-lg border border-white/20 text-white hover:bg-white/10 transition text-sm font-semibold">
217
+ View Detailed Analysis
218
+ </button>
219
  </div>
220
  </div>
221
 
222
+ {/* ----------- BOTTOM ROW: Yearly Streak ----------- */}
223
+ <div className="bg-[#607B8F] rounded-2xl shadow-xl p-6 border border-white/10">
224
+ <h2 className="text-xl font-bold mb-4 text-white flex items-center gap-2">
225
+ <Clock className="text-[#F7E396]" size={24} /> Activity Streak
226
+ </h2>
227
+ {/* Container for the streak chart to handle responsiveness */}
228
+ <div className="overflow-x-auto pb-2">
229
+ <YearlyStreak data={streakData} />
230
+ </div>
231
  </div>
232
  </div>
233
  );