forked from QuantStack/quantstack.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSubTeam.tsx
37 lines (34 loc) · 1.18 KB
/
SubTeam.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import styles from "./styles.module.css";
import PopupPortrait from "./SmallPortraitCard";
import Link from "@docusaurus/Link";
import { useLocation } from "@docusaurus/router";
export default function SubTeam({ subTeamName, subTeam }) {
let firstName = useLocation().pathname.split("/about/")[1];
console.log('First name before transformation:', firstName);
return (
<div className={styles.subteam_container}>
<h2 className={"text--center"}> {subTeamName}</h2>
<div className={"container"}>
<ul className="row padding-none flex-full-centered row-with-margin-top">
{subTeam.map(
(person, index) =>
!void 0 && (
<li className="cards-list" key={index}>
<div className="col">
<Link href={`/about/${person.firstName}`}>
<PopupPortrait
person={person}
isPopupOpen={
firstName === person.firstName
}
/>
</Link>
</div>
</li>
)
)}
</ul>
</div>
</div>
);
}