Skip to content

Commit 1657fab

Browse files
committed
feat: added teamsdata.json, changed instances of <a /> to <Link />
1 parent f772c38 commit 1657fab

File tree

4 files changed

+47
-54
lines changed

4 files changed

+47
-54
lines changed

src/components/SkewButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ SkewButton.propTypes = {
2121
link: PropTypes.string.isRequired,
2222
};
2323

24-
export default SkewButton;
24+
export default SkewButton;

src/pages/Teams/TeamMember.jsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import PropTypes from "prop-types";
2+
import { Link } from "react-router-dom";
23
import LinkedInIcon from "@/assets/images/Teams/linkedin.svg";
34
import GithubIcon from "@/assets/images/Teams/github.svg";
45
import InstagramIcon from "@/assets/images/Teams/instagram.svg";
@@ -25,30 +26,30 @@ function TeamMember({ member }) {
2526
{description}
2627
</p>
2728
<div className="flex justify-center space-x-4">
28-
<a
29-
href={linkedin}
29+
<Link
30+
to={linkedin}
3031
target="_blank"
3132
rel="noreferrer"
3233
className="text-white font-sans"
3334
>
3435
<img src={LinkedInIcon} alt="Linkedin" className="w-10 h-10 p-2" />
35-
</a>
36-
<a
37-
href={github}
36+
</Link>
37+
<Link
38+
to={github}
3839
target="_blank"
3940
rel="noreferrer"
4041
className="text-white font-sans"
4142
>
4243
<img src={GithubIcon} alt="Github" className="w-10 h-10 p-2" />
43-
</a>
44-
<a
45-
href={instagram}
44+
</Link>
45+
<Link
46+
to={instagram}
4647
target="_blank"
4748
rel="noreferrer"
4849
className="text-white font-sans"
4950
>
5051
<img src={InstagramIcon} alt="GitHub" className="w-10 h-10 p-2" />
51-
</a>
52+
</Link>
5253
</div>
5354
</div>
5455
</div>

src/pages/Teams/index.jsx

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,17 @@
11
import TeamMember from "@/pages/Teams/TeamMember";
22
import SkewButton from "@/components/SkewButton";
3-
4-
const teamMembers = [
5-
{
6-
name: "Aditya Desai",
7-
position: "PRESIDENT",
8-
image:
9-
"https://media.licdn.com/dms/image/C4D03AQEfAUzWvBYdVg/profile-displayphoto-shrink_800_800/0/1663487119730?e=1714608000&v=beta&t=q9xS0ojSlWeXtvYbYAGKC-POp7f0TXCfrTSkoP1yMLA",
10-
description:
11-
"Praesent vestibulum libero non diam Praesent vestibulum libero non diam ",
12-
linkedin: "https://linkedin.com/in/john-doe",
13-
instagram: "https://instagram.com/john_doe",
14-
github: "https://github.com/john-doe",
15-
},
16-
{
17-
name: "Dr. Rupali Gangarde",
18-
position: "FACULTY ADVISOR",
19-
image:
20-
"https://media-pnq1-2.cdn.whatsapp.net/v/t61.24694-24/362246050_985287035952930_3222687059276313181_n.jpg?ccb=11-4&oh=01_AdQzhJX4u0dIpMxNBjPYbrW4sfwKKQ4xbLc3kW69swB3Wg&oe=65EA2552&_nc_sid=e6ed6c&_nc_cat=106",
21-
description:
22-
"Praesent vestibulum libero non diam Praesent vestibulum libero non diam ",
23-
linkedin: "https://linkedin.com/in/jane-doe",
24-
instagram: "https://instagram.com/jane_doe",
25-
github: "https://github.com/jane-doe",
26-
},
27-
{
28-
name: "Saksham Gupta",
29-
position: "VICE-PRESIDENT",
30-
image:
31-
"https://media.licdn.com/dms/image/C4D03AQFf0M0m5SBEsw/profile-displayphoto-shrink_800_800/0/1661514280105?e=1714608000&v=beta&t=OU8Rye-qRguvPyAsyJ19wMr3toD5PtIFWEwjORVlohc",
32-
description:
33-
"Praesent vestibulum libero non diam Praesent vestibulum libero non diam ",
34-
linkedin: "https://linkedin.com/in/john-doe",
35-
instagram: "https://instagram.com/john_doe",
36-
github: "https://github.com/john-doe",
37-
},
38-
// Your team members data here
39-
];
3+
import teamMembersData from "./teamsdata.json";
404

415
function Teams() {
6+
const teamMembers = teamMembersData.map((member) => (
7+
<TeamMember key={member.name} member={member} />
8+
));
9+
4210
return (
4311
<div className="bg-zinc-800 min-h-screen">
4412
<div className="flex-grow container mx-auto pr-20 pl-20 space-x-30 py-8">
45-
<div
46-
className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8"
47-
style={{ gridAutoRows: "minmax(auto, max-content)" }}
48-
>
49-
{teamMembers.map((member) => (
50-
<TeamMember key={member.name} member={member} />
51-
))}
13+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 grid grid-rows-auto">
14+
{teamMembers}
5215
</div>
5316
<SkewButton text="SEE ALL" link="/all-members" />
5417
</div>

src/pages/Teams/teamsdata.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[
2+
{
3+
"name": "Aditya Desai",
4+
"position": "PRESIDENT",
5+
"image": "https://media.licdn.com/dms/image/C4D03AQEfAUzWvBYdVg/profile-displayphoto-shrink_800_800/0/1663487119730?e=1714608000&v=beta&t=q9xS0ojSlWeXtvYbYAGKC-POp7f0TXCfrTSkoP1yMLA",
6+
"description": "Praesent vestibulum libero non diam Praesent vestibulum libero non diam",
7+
"linkedin": "https://linkedin.com/in/john-doe",
8+
"instagram": "https://instagram.com/john_doe",
9+
"github": "https://github.com/john-doe"
10+
},
11+
{
12+
"name": "Dr. Rupali Gangarde",
13+
"position": "FACULTY ADVISOR",
14+
"image": "https://media-pnq1-2.cdn.whatsapp.net/v/t61.24694-24/362246050_985287035952930_3222687059276313181_n.jpg?ccb=11-4&oh=01_AdQzhJX4u0dIpMxNBjPYbrW4sfwKKQ4xbLc3kW69swB3Wg&oe=65EA2552&_nc_sid=e6ed6c&_nc_cat=106",
15+
"description": "Praesent vestibulum libero non diam Praesent vestibulum libero non diam",
16+
"linkedin": "https://linkedin.com/in/jane-doe",
17+
"instagram": "https://instagram.com/jane_doe",
18+
"github": "https://github.com/jane-doe"
19+
},
20+
{
21+
"name": "Saksham Gupta",
22+
"position": "VICE-PRESIDENT",
23+
"image": "https://media.licdn.com/dms/image/C4D03AQFf0M0m5SBEsw/profile-displayphoto-shrink_800_800/0/1661514280105?e=1714608000&v=beta&t=OU8Rye-qRguvPyAsyJ19wMr3toD5PtIFWEwjORVlohc",
24+
"description": "Praesent vestibulum libero non diam Praesent vestibulum libero non diam",
25+
"linkedin": "https://linkedin.com/in/john-doe",
26+
"instagram": "https://instagram.com/john_doe",
27+
"github": "https://github.com/john-doe"
28+
}
29+
]

0 commit comments

Comments
 (0)