Skip to content

Commit 0207aa2

Browse files
authored
Merge pull request #52 from Amphere1/main
fix: required changes done
2 parents 207d1f8 + 2e78df5 commit 0207aa2

3 files changed

Lines changed: 52 additions & 17 deletions

File tree

src/components/Team.jsx

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { useNavigate } from "react-router";
77
const TeamSlider = () => {
88
const [currentSlideIndex, setCurrentSlideIndex] = useState(0);
99
const [cardsPerView, setCardsPerView] = useState(1);
10+
const [activeTeam, setActiveTeam] = useState("All");
1011
const navigate = useNavigate();
1112

1213
useEffect(() => {
@@ -34,7 +35,20 @@ const TeamSlider = () => {
3435
new Map(teamMembers.map((member) => [member.name, member])).values(),
3536
);
3637

37-
const maxSlideIndex = Math.max(0, uniqueTeamMembers.length - cardsPerView);
38+
const teams = [
39+
"All",
40+
"Executive Body",
41+
"Team Bluebird",
42+
"Team Bluestreak",
43+
"Team Blueprint",
44+
];
45+
46+
const filteredTeamMembers =
47+
activeTeam === "All"
48+
? uniqueTeamMembers
49+
: uniqueTeamMembers.filter((member) => member.team === activeTeam);
50+
51+
const maxSlideIndex = Math.max(0, filteredTeamMembers.length - cardsPerView);
3852

3953
const showNextMembers = () => {
4054
setCurrentSlideIndex((currentIndex) => {
@@ -68,13 +82,31 @@ const TeamSlider = () => {
6882
<section className="bg-[#00163A] text-white px-4 sm:px-6 py-16">
6983
<div className="max-w-7xl mx-auto">
7084
<div className="mb-10">
71-
<h2 className="text-3xl font-bold mb-2 ml-12">Our team</h2>
72-
<p className="text-xl text-gray-300 ml-12">
85+
<h2 className="text-3xl font-bold mb-2 ml-4 sm:ml-12">Our team</h2>
86+
<p className="text-xl text-gray-300 ml-4 sm:ml-12">
7387
Meet Our Amazing Team Members
7488
</p>
89+
90+
{/* Team Filter Buttons */}
91+
<div className="flex justify-start flex-wrap gap-2 sm:gap-4 mt-6 mb-6 ml-4 sm:ml-12">
92+
{teams.map((team) => (
93+
<button
94+
key={team}
95+
onClick={() => setActiveTeam(team)}
96+
className={`px-2 py-1 sm:px-4 sm:py-2 rounded-full border text-sm sm:text-lg font-medium transition cursor-pointer hover:bg-white hover:text-[#00163A] ${
97+
activeTeam === team
98+
? "bg-white text-[#00163A]"
99+
: "bg-transparent text-white border-white"
100+
}`}
101+
>
102+
{team}
103+
</button>
104+
))}
105+
</div>
106+
75107
<button
76108
onClick={viewFullTeam}
77-
className="mt-4 border border-white text-white py-2 px-4 ml-12 rounded hover:bg-white hover:text-[#00163A] transition-all duration-300 cursor-pointer"
109+
className="mt-4 border border-white text-white py-2 px-4 ml-4 sm:ml-12 rounded hover:bg-white hover:text-[#00163A] transition-all duration-300 cursor-pointer"
78110
>
79111
View all team members
80112
</button>
@@ -96,7 +128,7 @@ const TeamSlider = () => {
96128
transform: `translateX(-${currentSlideIndex * (100 / cardsPerView)}%)`,
97129
}}
98130
>
99-
{uniqueTeamMembers.map((teamMember, memberIndex) => (
131+
{filteredTeamMembers.map((teamMember, memberIndex) => (
100132
<div
101133
key={`team-member-${memberIndex}`}
102134
className="flex-shrink-0 px-2"
@@ -167,12 +199,14 @@ const TeamSlider = () => {
167199
</div>
168200

169201
<div className="mt-16">
170-
<h3 className="text-xl font-bold mb-1 ml-12">Join Us Today!</h3>
171-
<p className="text-base text-gray-300 mb-3 ml-12">
202+
<h3 className="text-xl font-bold mb-1 ml-4 sm:ml-12">
203+
Join Us Today!
204+
</h3>
205+
<p className="text-base text-gray-300 mb-3 ml-4 sm:ml-12">
172206
Ready to be part of our amazing team? We're always looking for
173207
talented individuals who share our passion.
174208
</p>
175-
<button className="border border-white text-white py-2 px-4 ml-12 rounded hover:bg-white hover:text-[#00163A] transition-all duration-300 cursor-pointer">
209+
<button className="border border-white text-white py-2 px-4 ml-4 sm:ml-12 rounded hover:bg-white hover:text-[#00163A] transition-all duration-300 cursor-pointer">
176210
Apply here
177211
</button>
178212
</div>

src/config/teammate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const teamMembers = [
4848
linkedin: "https://www.linkedin.com/in/nikhil-dalai/",
4949
},
5050
{
51-
name: "Aaditya Sahu",
51+
name: "Aaditya Sahoo",
5252
title: "Captain",
5353
img: "https://res.cloudinary.com/dm406z4pf/image/upload/v1754117969/aaditya_kwvlki.jpg",
5454
team: "Team Bluestreak",

src/pages/team/TeamPage.jsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ const TeamPage = () => {
4444
</div>
4545

4646
<div className="max-w-4xl mx-auto text-lg font-bold mb-6">
47+
{activeTeam === "Executive Body" && (
48+
<p className="text-center text-gray-600">
49+
The Executive Body is the core leadership team of the ASME Student
50+
Section, responsible for planning, organizing, and executing all
51+
technical, professional, and outreach activities. It ensures
52+
coordination among members, represents the section, and drives
53+
initiatives that promote engineering knowledge and collaboration.
54+
</p>
55+
)}
4756
{activeTeam === "Team Bluestreak" && (
4857
<p className="text-center text-gray-600">
4958
Bluestreak, a team within ASME at NIT Rourkela, is a dedicated team
@@ -113,14 +122,6 @@ const TeamPage = () => {
113122
>
114123
<FaLinkedin size={18} />
115124
</a>
116-
<a
117-
href={member.twitter || "#"}
118-
target="_blank"
119-
rel="noopener noreferrer"
120-
className="text-black hover:text-blue-500"
121-
>
122-
<FaXTwitter size={18} />
123-
</a>
124125
</div>
125126
</div>
126127
</div>

0 commit comments

Comments
 (0)