Skip to content

Commit fe4d874

Browse files
committed
feat: truncate league description in LearningProgressSection and remove developer info from Note component
1 parent 0f6409e commit fe4d874

File tree

3 files changed

+9
-100
lines changed

3 files changed

+9
-100
lines changed

src/components/dashboard/LearningProgressSection.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,12 @@ const LearningProgressSection = ({ user }) => {
531531
{enrollment.league.name}
532532
</h3>
533533
</div>
534-
<p className="hidden md:block text-gray-600 text-sm leading-relaxed line-clamp-2">
535-
{enrollment.league.description}
536-
</p>
534+
<p className="hidden md:block text-gray-600 text-sm leading-relaxed">
535+
{enrollment.league.description.length > 100
536+
? enrollment.league.description.slice(0, 100) + '...'
537+
: enrollment.league.description}
538+
</p>
539+
537540
</div>
538541

539542
{/* Circular Progress Badge */}

src/components/landingPage/Cohort.jsx

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const fetchCohortsStructure = async () => {
3131
}
3232
};
3333

34-
const LeagueCard = ({ league, accentColor }) => {
34+
const LeagueCard = ({ league }) => {
3535
const weeks = league.weeks || [];
3636

3737
return (
@@ -64,12 +64,6 @@ const LeagueCard = ({ league, accentColor }) => {
6464
transition={{ duration: 0.5, delay: 0.2 }}
6565
>
6666
<div className="flex items-center mb-3">
67-
<div
68-
className="w-12 h-12 rounded-xl flex items-center justify-center mr-4"
69-
style={{ backgroundColor: `${accentColor}15` }}
70-
>
71-
<BookOpen size={24} style={{ color: accentColor }} />
72-
</div>
7367
<div>
7468
<h3 className="text-xl md:text-2xl font-bold text-gray-900 group-hover:text-gray-800 transition-colors duration-300">
7569
{league.name}
@@ -295,21 +289,6 @@ const Cohort = () => {
295289
}
296290

297291
const leagues = cohort.leagues || [];
298-
const totalWeeks = cohortsData?.meta?.totalWeeks || 0;
299-
300-
console.log('🎮 Rendering cohort with', leagues.length, 'leagues and', totalWeeks, 'total weeks');
301-
302-
// Define colors for different leagues
303-
const getLeagueColors = (leagueName) => {
304-
const name = leagueName.toLowerCase();
305-
if (name.includes('ml') || name.includes('machine learning')) {
306-
return "#3B82F6"; // Blue
307-
} else if (name.includes('finance')) {
308-
return "#059669"; // Green
309-
} else {
310-
return "#7C3AED"; // Purple
311-
}
312-
};
313292

314293
return (
315294
<MotionSection
@@ -402,9 +381,7 @@ const Cohort = () => {
402381
: 'lg:grid-cols-2 xl:grid-cols-3'
403382
}`}
404383
>
405-
{leagues.map((league, index) => {
406-
const accentColor = getLeagueColors(league.name);
407-
384+
{leagues.map((league, index) => {
408385
return (
409386
<MotionDiv
410387
key={league.id}
@@ -414,8 +391,7 @@ const Cohort = () => {
414391
transition={{ duration: 0.6, delay: index * 0.2 }}
415392
>
416393
<LeagueCard
417-
league={league}
418-
accentColor={accentColor}
394+
league={league}
419395
/>
420396
</MotionDiv>
421397
);

src/components/landingPage/Note.jsx

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
SiDocker,
1212
SiRedis,
1313
} from 'react-icons/si';
14-
import { RiGithubLine, RiLinkedinLine, RiTwitterXFill } from 'react-icons/ri';
1514
import { MotionDiv, MotionA, MotionSection, MotionP } from '../common/MotionWrapper';
1615

1716

@@ -60,22 +59,6 @@ const Note = () => {
6059
{ name: 'Redis', icon: SiRedis },
6160
];
6261

63-
// Developer information
64-
const developers = [
65-
{
66-
name: "Chahat Kesharwani",
67-
linkedin: "https://linkedin.com/in/chahatkesharwani",
68-
github: "https://github.com/chahatkesh",
69-
twitter: "https://x.com/chahatkesh"
70-
},
71-
{
72-
name: "Rishi Ahuja",
73-
linkedin: "https://linkedin.com/in/rishi-ahuja-b1a224310",
74-
github: "https://github.com/rishiahuja",
75-
twitter: "https://x.com/rishi2220"
76-
}
77-
];
78-
7962
return (
8063
<MotionSection
8164
className="py-16 border-t border-gray-200"
@@ -115,58 +98,6 @@ const Note = () => {
11598
})}
11699
</MotionDiv>
117100

118-
{/* Developers - Simple horizontal layout */}
119-
<MotionDiv
120-
className="flex justify-center gap-8 mb-8"
121-
variants={itemVariant}
122-
>
123-
{developers.map((dev, index) => (
124-
<MotionDiv
125-
key={index}
126-
className="text-center"
127-
variants={techVariant}
128-
whileHover={{ y: -2 }}
129-
>
130-
<p className="text-sm font-medium text-gray-800 mb-2">{dev.name}</p>
131-
<div className="flex justify-center gap-3">
132-
<MotionA
133-
href={dev.linkedin}
134-
target="_blank"
135-
rel="noopener noreferrer"
136-
className="text-gray-400 hover:text-[#0077B5] transition-colors duration-200"
137-
aria-label={`${dev.name}'s LinkedIn`}
138-
whileHover={{ scale: 1.2 }}
139-
whileTap={{ scale: 0.9 }}
140-
>
141-
<RiLinkedinLine size={18} />
142-
</MotionA>
143-
<MotionA
144-
href={dev.github}
145-
target="_blank"
146-
rel="noopener noreferrer"
147-
className="text-gray-400 hover:text-black transition-colors duration-200"
148-
aria-label={`${dev.name}'s GitHub`}
149-
whileHover={{ scale: 1.2 }}
150-
whileTap={{ scale: 0.9 }}
151-
>
152-
<RiGithubLine size={18} />
153-
</MotionA>
154-
<MotionA
155-
href={dev.twitter}
156-
target="_blank"
157-
rel="noopener noreferrer"
158-
className="text-gray-400 hover:text-black transition-colors duration-200"
159-
aria-label={`${dev.name}'s Twitter`}
160-
whileHover={{ scale: 1.2 }}
161-
whileTap={{ scale: 0.9 }}
162-
>
163-
<RiTwitterXFill size={18} />
164-
</MotionA>
165-
</div>
166-
</MotionDiv>
167-
))}
168-
</MotionDiv>
169-
170101
{/* Action buttons - Minimal and balanced */}
171102
<MotionDiv
172103
className="flex justify-center gap-4"
@@ -184,7 +115,6 @@ const Note = () => {
184115
<span>Server Status</span>
185116
<ExternalLink size={14} />
186117
</MotionA>
187-
188118
<MotionA
189119
href="https://github.com/openlearnnitj/"
190120
target="_blank"

0 commit comments

Comments
 (0)