Skip to content

Commit 1385ead

Browse files
committed
final finalizing
1 parent c91236a commit 1385ead

File tree

11 files changed

+313
-125
lines changed

11 files changed

+313
-125
lines changed
File renamed without changes.

client/src/common/LeftBox.jsx

+22-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from "react";
2-
import AutoProfile from "../assets/autoprofile.png";
2+
import robertProfile from "../assets/robertsmith.png";
3+
import autoprofile from "../assets/autoprofile.png";
34

45
function LeftBox({ title, name, children, role }) {
56
return (
@@ -17,11 +18,26 @@ function LeftBox({ title, name, children, role }) {
1718
data-testid={"profilepicture"}
1819
className="flex justify-center p-4 items-center"
1920
>
20-
<img
21-
src={AutoProfile}
22-
alt="Auto Profile"
23-
className="w-[135px] h-[135px] object-cover"
24-
/>
21+
{(() => {
22+
switch (name) {
23+
case "Robert Smith":
24+
return (
25+
<img
26+
src={robertProfile}
27+
alt="Profile"
28+
className="w-[135px] h-[135px] object-cover rounded-full"
29+
/>
30+
);
31+
default:
32+
return (
33+
<img
34+
src={autoprofile}
35+
alt="Profile"
36+
className="w-[135px] h-[135px] object-cover rounded-full"
37+
/>
38+
);
39+
}
40+
})()}
2541
</div>
2642
<h1 className="text-2xl text-black font-semibold mb-2 text-center">
2743
Hi {name}!

client/src/common/MatchCard.jsx

+60-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import React from "react";
22
import ProfilePicture from "./ProfilePicture";
33
import { useNavigate } from "react-router-dom";
44
import { UseAuth } from "../context/AuthContext";
5+
import lindaProfile from "../assets/lindagarcia.png";
6+
import michaelProfile from "../assets/michaelbrown.png";
7+
import robertProfile from "../assets/robertsmith.png";
8+
import autoprofile from "../assets/autoprofile.png";
59

610
const MatchCard = ({ match, compact, selfView }) => {
711
const { user } = UseAuth();
@@ -41,7 +45,44 @@ const MatchCard = ({ match, compact, selfView }) => {
4145
return (
4246
<div className="flex rounded-3xl shadow-lg bg-[#E3E0E0] w-full mb-6">
4347
<div className="bg-[#B89C75] w-1/4 p-4 rounded-l-3xl flex items-center justify-center">
44-
<ProfilePicture imgUrl={match.imgUrl} altText={match.name} />
48+
{(() => {
49+
switch (match.name) {
50+
case "Linda Garcia":
51+
return (
52+
<img
53+
src={lindaProfile}
54+
alt="Profile"
55+
className="rounded-full object-cover bg-white"
56+
/>
57+
);
58+
case "Robert Smith":
59+
return (
60+
<img
61+
src={robertProfile}
62+
alt="Profile"
63+
className="rounded-full object-cover bg-white"
64+
/>
65+
);
66+
case "Michael Brown":
67+
return (
68+
<img
69+
src={michaelProfile}
70+
alt="Profile"
71+
className="rounded-full object-cover bg-white"
72+
/>
73+
);
74+
default:
75+
return (
76+
<img
77+
src={autoprofile}
78+
alt="Profile"
79+
className="rounded-full object-cover bg-white"
80+
/>
81+
);
82+
}
83+
})()}
84+
85+
{/* <ProfilePicture imgUrl={match.imgUrl} altText={match.name} /> */}
4586
</div>
4687

4788
<div className="w-3/4 h-70 flex flex-col justify-between pl-4 py-6">
@@ -53,7 +94,9 @@ const MatchCard = ({ match, compact, selfView }) => {
5394
<span className="font-bold">Role:</span>{" "}
5495
{match.mentorId ? "Mentor" : "Mentee"}
5596
</p>{" "}
56-
<p className="text-gray-600">{match.headline}</p>
97+
<p className="text-gray-600">
98+
<span className="font-bold">Headline:</span> {match.headline}
99+
</p>
57100
{selfView ? (
58101
<div></div>
59102
) : (
@@ -72,9 +115,21 @@ const MatchCard = ({ match, compact, selfView }) => {
72115
<div>
73116
<div className="flex justify-between">
74117
<div className="w-1/2">
75-
<p>
76-
<span className="font-bold">Headline:</span> {match.headline}
77-
</p>
118+
<div className="flex items-center">
119+
<span className="font-bold">Headline:</span>{" "}
120+
{(() => {
121+
switch (match.name) {
122+
case "Linda Garcia":
123+
return <div> Cybersecurity Expert</div>;
124+
case "Robert Smith":
125+
return <div> Data Science Mentor</div>;
126+
case "Michael Brown":
127+
return <div> Marketing and Strategy Mentor</div>;
128+
default:
129+
return <div> Mentor</div>;
130+
}
131+
})()}
132+
</div>
78133
<p>
79134
<span className="font-bold">Role:</span>{" "}
80135
{match.mentorId ? "Mentor" : "Mentee"}

client/src/common/MatchesBox.js

+90-57
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,10 @@ import { useMatches } from "../context/MatchesContext";
33
import { UseAuth } from "../context/AuthContext";
44
import ProfilePicture from "./ProfilePicture";
55
import { useNavigate } from "react-router-dom";
6-
7-
// const matches = []; //testing
8-
// const matches = [
9-
// {
10-
// name: "Lerich",
11-
// id: "67180e89157b3c18a7d20248",
12-
// imgUrl: "https://example.com/profile.jpg",
13-
// headline: "Passionate Engineer | Driving Innovation and Growth in Law",
14-
// role: "Mentor",
15-
// fields: ["Computer Science"],
16-
// industries: ["Law"],
17-
// location: "Dallas, TX",
18-
// university: "The University of Texas at Dallas",
19-
// personalityType: "Introvert",
20-
// languages: ["English"],
21-
// bio: "I really look forward to being a mentor and having a positive impact on the community!",
22-
// links: [],
23-
// },
24-
// {
25-
// name: "Abis",
26-
// imgUrl: "https://example.com/profile.jpg",
27-
// headline: "Strategic Thinker | Specializing in Data Analysis slay",
28-
// role: "Mentor",
29-
// fields: ["Computer Science"],
30-
// industries: ["Health"],
31-
// location: "Houston, TX",
32-
// university: "The University of Texas at Dallas",
33-
// jobTitle: "Software Engineer",
34-
// company: "Texas Instruments",
35-
// personalityType: "Extrovert",
36-
// languages: ["English"],
37-
// bio: "I really look forward to being a mentor and having a positive impact on the community!",
38-
// links: [],
39-
// },
40-
// {
41-
// name: "Jeshna",
42-
// imgUrl: "https://example.com/profile.jpg",
43-
// headline: "Creative Problem Solver | Front-End Developer",
44-
// role: "Mentor",
45-
// fields: ["Computer Science"],
46-
// industries: ["Education"],
47-
// location: "San Francisco, California",
48-
// university: "Stanford University",
49-
// personalityType: "Extrovert",
50-
// languages: ["English"],
51-
// bio: "I really look forward to being a mentor and having a positive impact on the community!",
52-
// links: [],
53-
// },
54-
// ];
6+
import lindaProfile from "../assets/lindagarcia.png";
7+
import michaelProfile from "../assets/michaelbrown.png";
8+
import robertProfile from "../assets/robertsmith.png";
9+
import autoprofile from "../assets/autoprofile.png";
5510

5611
function MatchesBox() {
5712
const { user } = UseAuth();
@@ -99,11 +54,47 @@ function MatchesBox() {
9954
{mentees.map((mentee) => (
10055
<div key={mentee.id} className="flex rounded-3xl w-full mb-1">
10156
<div className="w-1/4 flex items-center justify-center">
102-
<ProfilePicture
57+
{/* <ProfilePicture
10358
imgUrl={mentee.imgUrl}
10459
altText={mentee.name}
10560
size="w-25 h-25"
106-
/>
61+
/> */}
62+
{(() => {
63+
switch (mentee.name) {
64+
case "Linda Garcia":
65+
return (
66+
<img
67+
src={lindaProfile}
68+
alt="Profile"
69+
className="rounded-full object-cover bg-white"
70+
/>
71+
);
72+
case "Robert Smith":
73+
return (
74+
<img
75+
src={robertProfile}
76+
alt="Profile"
77+
className="rounded-full object-cover bg-white"
78+
/>
79+
);
80+
case "Michael Brown":
81+
return (
82+
<img
83+
src={michaelProfile}
84+
alt="Profile"
85+
className="rounded-full object-cover bg-white"
86+
/>
87+
);
88+
default:
89+
return (
90+
<img
91+
src={autoprofile}
92+
alt="Profile"
93+
className="rounded-full object-cover bg-white"
94+
/>
95+
);
96+
}
97+
})()}
10798
</div>
10899
<div className="w-3/4 h-70 flex flex-col justify-between pl-4 py-6">
109100
<h2 className="text-2xl font-bold">{mentee.name}</h2>
@@ -162,17 +153,59 @@ function MatchesBox() {
162153
{matches.map((match) => (
163154
<div key={match.id} className="flex rounded-3xl w-full mb-1">
164155
<div className="w-1/4 flex items-center justify-center">
165-
<ProfilePicture
166-
imgUrl={match.imgUrl}
167-
altText={match.name}
168-
size="w-25 h-25"
169-
/>
156+
{(() => {
157+
switch (match.name) {
158+
case "Linda Garcia":
159+
return (
160+
<img
161+
src={lindaProfile}
162+
alt="Profile"
163+
className="rounded-full object-cover bg-white"
164+
/>
165+
);
166+
case "Robert Smith":
167+
return (
168+
<img
169+
src={robertProfile}
170+
alt="Profile"
171+
className="rounded-full object-cover bg-white"
172+
/>
173+
);
174+
case "Michael Brown":
175+
return (
176+
<img
177+
src={michaelProfile}
178+
alt="Profile"
179+
className="rounded-full object-cover bg-white"
180+
/>
181+
);
182+
default:
183+
return (
184+
<img
185+
src={autoprofile}
186+
alt="Profile"
187+
className="rounded-full object-cover bg-white"
188+
/>
189+
);
190+
}
191+
})()}
170192
</div>
171193
<div className="w-3/4 h-70 flex flex-col justify-between pl-4 py-6">
172194
<h2 className="text-2xl font-bold">{match.name}</h2>
173195
<p>
174196
<span className="font-bold">Headline:</span>{" "}
175-
{match.headline}
197+
{(() => {
198+
switch (match.name) {
199+
case "Linda Garcia":
200+
return <div>Cybersecurity Expert</div>;
201+
case "Robert Smith":
202+
return <div>Data Science Mentor</div>;
203+
case "Michael Brown":
204+
return <div>Marketing and Strategy Mentor</div>;
205+
default:
206+
return <div>Mentor</div>;
207+
}
208+
})()}
176209
</p>
177210
</div>
178211
</div>

client/src/common/navbar.js

+30-9
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { CiChat1 } from "react-icons/ci";
55
import { IoMdArrowDropdown } from "react-icons/io";
66
import { IoPeople } from "react-icons/io5";
77
import { useNavigate } from "react-router-dom";
8-
import AutoProfile from "../assets/autoprofile.png";
9-
import LindaProfile from "../assets/lindagarcia.png";
8+
import robertProfile from "../assets/robertsmith.png";
9+
import autoprofile from "../assets/autoprofile.png";
10+
import { UseAuth } from "../context/AuthContext";
1011

1112
const Navbar = () => {
13+
const { user } = UseAuth();
1214
const navigate = useNavigate();
1315

1416
const handleMatchClick = () => {
@@ -37,8 +39,12 @@ const Navbar = () => {
3739
onClick={() => navigate("/home")}
3840
className="flex items-center"
3941
>
40-
<img src={logo} alt="mentor/ee logo" className="h-16 w-auto mr-2" />
41-
<span className="text-3xl font-bold text-white">mentor/ee</span>
42+
<img
43+
src={logo}
44+
alt="ment(or/ee) logo"
45+
className="h-16 w-auto mr-2"
46+
/>
47+
<span className="text-3xl font-bold text-white">ment(or/ee)</span>
4248
</button>
4349
</div>
4450

@@ -72,11 +78,26 @@ const Navbar = () => {
7278
onClick={handleProfileClick}
7379
className="flex flex-col items-center py-2 px-6 text-base font-semibold text-white rounded-lg hover:bg-[#1A202C] focus:outline-none focus:ring-2 focus:ring-[#1F2839]"
7480
>
75-
<img
76-
src={AutoProfile}
77-
alt="Profile"
78-
className="w-7 h-7 rounded-full object-cover bg-white"
79-
/>
81+
{(() => {
82+
switch (user.name) {
83+
case "Robert Smith":
84+
return (
85+
<img
86+
src={robertProfile}
87+
alt="Profile"
88+
className="w-7 h-7 rounded-full object-cover bg-white"
89+
/>
90+
);
91+
default:
92+
return (
93+
<img
94+
src={autoprofile}
95+
alt="Profile"
96+
className="w-7 h-7 rounded-full object-cover bg-white"
97+
/>
98+
);
99+
}
100+
})()}
80101
<div className="flex items-center">Profile</div>
81102
</button>
82103
</div>

client/src/components/matches/matches.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { UseAuth } from "../../context/AuthContext";
77
import { useMatches } from "../../context/MatchesContext";
88
import lindaProfile from "../../assets/lindagarcia.png";
99
import michaelProfile from "../../assets/michaelbrown.png";
10-
import ericProfile from "../../assets/ericjones.png";
10+
import robertProfile from "../../assets/robertsmith.png";
1111

1212
const Matches = () => {
1313
const { user } = UseAuth();
@@ -67,7 +67,7 @@ const Matches = () => {
6767
},
6868
{
6969
name: "Eric Jones",
70-
imgUrl: ericProfile,
70+
imgUrl: robertProfile,
7171
id: "67180e89157b3c18a7d20248",
7272
mentorId: "aasdsafcdscda",
7373
headline: "Intelligence for Social Good",

0 commit comments

Comments
 (0)