Skip to content

Commit f0adcc5

Browse files
fix: Hide empty IG heads
1 parent 0247356 commit f0adcc5

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

components/student-group/StudentGroupCard.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ export default function StudentGroupCard({
2424
<h3 className={`mb-3 text-center text-xl font-bold text-gray-900`}>
2525
{organisation.name}
2626
</h3>
27-
<p className={`mb-4 line-clamp-6 text-sm leading-relaxed text-[#A1A1A1]`}>
27+
<p className={`mb-4 line-clamp-6 text-sm leading-relaxed text-gray-500`}>
2828
{organisation.description || 'No description available.'}
2929
</p>
3030

31-
<p className='mb-4 text-sm text-gray-500'>
32-
Headed by{' '}
33-
{organisation.userOrgs.map((igHead) => igHead.user.name).join(', ')}
34-
</p>
31+
{organisation.userOrgs.length !== 0 && (
32+
<p className='mb-4 text-sm text-[#A1A1A1]'>
33+
Headed by{' '}
34+
{organisation.userOrgs.map((igHead) => igHead.user.name).join(', ')}
35+
</p>
36+
)}
3537

3638
<ShowIGModal organisation={organisation} />
3739
</div>

0 commit comments

Comments
 (0)