Skip to content

Commit c4c92cf

Browse files
authored
Update profile-card.tsx
Signed-off-by: Yash Pawar <[email protected]>
1 parent 02c326d commit c4c92cf

File tree

1 file changed

+42
-29
lines changed

1 file changed

+42
-29
lines changed

components/team/profile-card.tsx

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import { type TeamMember } from "./teamData";
1111
import { cn } from "@/lib/utils";
1212

1313
interface socialLink {
14-
icon: JSX.Element
15-
url?: string
14+
icon: JSX.Element
15+
url?: string
1616
}
1717

18-
export default function ProfileCard({
19-
name,
20-
role,
21-
imageUrl,
18+
export default function ProfileCard({
19+
name,
20+
role,
21+
imageUrl,
2222
githubUrl,
2323
linkedinUrl,
2424
email,
@@ -33,10 +33,14 @@ export default function ProfileCard({
3333
{ icon: <Instagram className="w-6 h-6 text-white" />, url: instagramUrl },
3434
].filter(link => link.url)
3535

36+
// Special case for Dr. Vikas Kolekar
37+
const isVikasKolekar = name.includes("Vikas Kolekar");
38+
const vikasInfo = "Prof. Vikas K. Kolekar, Assistant Professor at VIT Pune, Cisco NetAcad Instructor, completed PhD (April 2025) from SPPU on \"Adaptive Data Management Middleware for Federated Cloud\" under Dr. Sachin Sakhare";
39+
3640
return (
37-
<Card
41+
<Card
3842
className="relative w-full max-w-[300px] rounded-2xl overflow-hidden group cursor-pointer shadow-lg"
39-
onMouseEnter={() => setIsHovered(true && (socialLinks.length > 0))}
43+
onMouseEnter={() => setIsHovered(true && (socialLinks.length > 0 || isVikasKolekar))}
4044
onMouseLeave={() => setIsHovered(false)}
4145
>
4246
{/* Profile Image */}
@@ -48,22 +52,29 @@ export default function ProfileCard({
4852
width={300}
4953
height={400}
5054
/>
51-
{/* Overlay with social icons */}
52-
<div
55+
56+
{/* Overlay with social icons OR Vikas's info */}
57+
<div
5358
className={`absolute inset-0 bg-black/60 flex items-center justify-center gap-4 transition-opacity duration-300
54-
${(isHovered && (socialLinks.length > 0)) ? 'opacity-100' : 'opacity-0'}`}
59+
${isHovered ? 'opacity-100' : 'opacity-0'}`}
5560
>
56-
{socialLinks.map((link, index) => (
57-
link?.url ? (<Link
58-
key={index}
59-
href={link.url}
60-
target="_blank"
61-
rel="noopener noreferrer"
62-
className="p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors"
63-
>
64-
{link.icon}
65-
</Link>) : <></>
66-
))}
61+
{isVikasKolekar ? (
62+
<div className="text-white p-4 text-sm text-left">
63+
{vikasInfo}
64+
</div>
65+
) : (
66+
socialLinks.map((link, index) => (
67+
link?.url ? (<Link
68+
key={index}
69+
href={link.url}
70+
target="_blank"
71+
rel="noopener noreferrer"
72+
className="p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors"
73+
>
74+
{link.icon}
75+
</Link>) : <></>
76+
))
77+
)}
6778
</div>
6879
</div>
6980

@@ -79,14 +90,16 @@ export default function ProfileCard({
7990
</div>
8091
)}
8192

82-
{/* Plus Icon */}
83-
{(socialLinks.length > 0) && <div className="absolute bottom-4 right-4">
84-
<div className={`p-2 rounded-full bg-white transition-transform duration-300
85-
${isHovered ? 'rotate-45' : 'rotate-0'}`}
86-
>
87-
<Plus className="w-4 h-4 text-black" onClick={() => setIsHovered((isHov) => !isHov)} />
93+
{/* Plus Icon - Only show if not Vikas's card or if he has social links */}
94+
{(!isVikasKolekar || socialLinks.length > 0) && (
95+
<div className="absolute bottom-4 right-4">
96+
<div className={`p-2 rounded-full bg-white transition-transform duration-300
97+
${isHovered ? 'rotate-45' : 'rotate-0'}`}
98+
>
99+
<Plus className="w-4 h-4 text-black" onClick={() => setIsHovered((isHov) => !isHov)} />
100+
</div>
88101
</div>
89-
</div>}
102+
)}
90103
</Card>
91104
)
92105
}

0 commit comments

Comments
 (0)