Skip to content

Commit fcf6cf7

Browse files
Take review comments into account.
1 parent 209944a commit fcf6cf7

File tree

8 files changed

+88
-62
lines changed

8 files changed

+88
-62
lines changed

package-lock.json

Lines changed: 41 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/about/LargePortraitCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function Distinction({ person }) {
1313
{HasPersonDistinction ? (
1414
<ul style={{paddingLeft: "0px"}}>
1515
{person.distinctionTitle.map((distinction, index) => (
16-
<li className="items-list" key={person.firstName}>
16+
<li className="items-list" key={person.pageName}>
1717
<div>
1818
<Link href={person.distinctionLink[index]}>
1919
<DistinctionIcon className={styles.distinction_icon} />

src/components/about/LargePortraitCardPage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useEffect } from 'react';
55
import { Route } from 'react-router-dom';
66
import { About } from '@site/src/components/about'
77
import LargePortraitCard from '@site/src/components/about/LargePortraitCard';
8-
import { getTeamByPersonName } from '@site/src/components/about';
8+
import { getTeamByPageName } from '@site/src/components/about';
99
import styles from "@site/src/components/about/styles.module.css";
1010

1111
export default function LargePortraitCardPage() {
@@ -46,11 +46,11 @@ export default function LargePortraitCardPage() {
4646
<Layout>
4747
<About />
4848
<Route
49-
path="/about/:completeName"
50-
render={({ history, match }) => {
51-
const { completeName } = match.params; /* extract the dynamic part from the url i.e. the completeName*/
52-
const teamMembers = getTeamByPersonName(completeName);
53-
const person = teamMembers.find((person) => person.completeName.replace(/\s+/g, '').normalize("NFD").replace(/[\u0300-\u036f]/g, '') === completeName);
49+
path="/about/:pageName"
50+
render={({ match }) => {
51+
const { pageName } = match.params; /* extract the dynamic part from the url i.e. the pageName*/
52+
const teamMembers = getTeamByPageName(pageName);
53+
const person = teamMembers.find((person) => person.pageName== pageName);
5454
if (!person) return null;
5555

5656
return (

src/components/about/SubTeam.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function SubTeam({ subTeamName, subTeam }) {
88
<div className={"container"}>
99
<ul className="row padding-none flex-full-centered row-with-margin-top">
1010
{subTeam.map((person, index) => (
11-
<li className="cards-list" key={person.firstName}>
11+
<li className="cards-list" key={person.pageName}>
1212
<div className="col">
1313
<SmallPortraitCard person={person} />
1414
</div>

0 commit comments

Comments
 (0)