Skip to content

Commit 9cfd55f

Browse files
committed
Refactor team data structure
1 parent 40d58f8 commit 9cfd55f

File tree

2 files changed

+189
-175
lines changed

2 files changed

+189
-175
lines changed

src/app/people/page.tsx

Lines changed: 7 additions & 175 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,18 @@
11
import { Metadata } from "next";
22
import Image from "next/image";
33
import Link from "next/link";
4+
import { TEAM_DATA, TeamMember } from "@/data/team";
45

56
export const metadata: Metadata = {
67
title: "Team - Preferred.AI",
78
description: "Meet the Preferred.AI team and alumni",
89
};
910

10-
interface TeamMember {
11-
name: string;
12-
image: string;
13-
url: string;
14-
title: string;
15-
link?: string;
16-
}
17-
18-
const professor: TeamMember[] = [
19-
{
20-
name: "Hady W. Lauw",
21-
image: "/uploads/2018/06/photo_hadylauw.png",
22-
url: "/team/hadylauw/",
23-
title: "Associate Professor (SMU)",
24-
link: "http://www.hadylauw.com",
25-
},
26-
];
27-
28-
const staff: TeamMember[] = [
29-
{
30-
name: "Do Dinh Hieu",
31-
image: "/uploads/2020/08/photo_hieu2.jpg",
32-
url: "/team/hieu/",
33-
title: "Research Scientist (SMU)",
34-
link: "https://hieuddo.github.io/",
35-
},
36-
];
37-
38-
const studentsRaw: TeamMember[] = [
39-
{
40-
name: "Ezekiel Ong Young",
41-
image: "/uploads/2024/01/photo_ezekiel.jpg",
42-
url: "/team/ezekiel-ong-young/",
43-
title: "PhD Candidate (SMU)",
44-
link: "https://www.linkedin.com/in/ezekiel-young/",
45-
},
46-
{
47-
name: "Le Thi Phuong",
48-
image: "/uploads/2024/01/photo_phuong.jpg",
49-
url: "/team/le-thi-phuong/",
50-
title: "PhD Candidate (SMU)",
51-
link: "https://www.linkedin.com/in/phuonglt26/",
52-
},
53-
{
54-
name: "Lim Jia Peng",
55-
image: "/uploads/2020/12/photo_jiapeng.png",
56-
url: "/team/jiapeng/",
57-
title: "PhD Candidate (SMU)",
58-
link: "https://www.linkedin.com/in/jia-peng-lim",
59-
},
60-
{
61-
name: "Nguyen Minh Quang",
62-
image: "/uploads/2024/01/photo_quang.jpg",
63-
url: "/team/nguyen-minh-quang/",
64-
title: "PhD Candidate (SMU)",
65-
link: "https://www.linkedin.com/in/mquang-nguyen/",
66-
},
67-
{
68-
name: "Nguyen Quoc Trung, Derrick",
69-
image: "",
70-
url: "",
71-
title: "PhD Candidate (SMU)",
72-
link: "",
73-
},
74-
{
75-
name: "Dilan Dinushka",
76-
image: "/uploads/2023/05/photo_dilan.jpeg",
77-
url: "/team/dilan-dinushka/",
78-
title: "PhD co-supervisee (SMU)",
79-
link: "https://www.linkedin.com/in/ddsdinushka",
80-
},
81-
{
82-
name: "Dong Viet Hoang, Eric",
83-
image: "",
84-
url: "",
85-
title: "PhD co-supervisee (SMU)",
86-
link: "",
87-
},
88-
];
11+
const professor = TEAM_DATA.professor;
12+
const staff = TEAM_DATA.staff;
8913

9014
// Sort students: PhD Candidates first (alphabetically), then PhD co-supervisees (alphabetically)
91-
const students = [...studentsRaw].sort((a, b) => {
15+
const students = [...TEAM_DATA.students].sort((a, b) => {
9216
const isACand = a.title.includes("PhD Candidate");
9317
const isBCand = b.title.includes("PhD Candidate");
9418

@@ -101,102 +25,10 @@ const students = [...studentsRaw].sort((a, b) => {
10125
return isACand ? -1 : 1;
10226
});
10327

104-
const alumniRaw: TeamMember[] = [
105-
{
106-
name: "Aghiles Salah",
107-
image: "/uploads/2018/04/ghiles.png",
108-
url: "/team/aghiles/",
109-
title: "Senior Research Scientist (Rakuten)",
110-
link: "http://saghiles.github.io/",
111-
},
112-
{
113-
name: "Chia Chong Cher",
114-
image: "/uploads/2018/06/headshot-square.png",
115-
url: "/team/chongcher/",
116-
title: "Senior Manager (Singapore Institute of Legal Education)",
117-
link: "https://www.linkedin.com/in/chongcher/",
118-
},
119-
{
120-
name: "Darryl Ong",
121-
image: "/uploads/2019/06/dp_400-1.jpg",
122-
url: "/team/darryl/",
123-
title: "Machine Learning Engineer (Hewlett Packard Enterprise)",
124-
link: "https://www.linkedin.com/in/ongrongsheng/",
125-
},
126-
{
127-
name: "Hongtuo Nie",
128-
image: "/uploads/2023/05/photo_hongtuonie.jpeg",
129-
url: "/team/hongtuo-nie/",
130-
title: "",
131-
link: "https://felixnie.github.io/",
132-
},
133-
{
134-
name: "Konstantinos Theocharidis",
135-
image: "/uploads/2023/05/photo_konstantinos.jpeg",
136-
url: "/team/konstantinos-theocharidis/",
137-
title: "",
138-
link: "https://www.linkedin.com/in/konstantinos-theocharidis-36299159/",
139-
},
140-
{
141-
name: "Le Duc Trong, Tony",
142-
image: "/uploads/2018/04/TrongLe_Avatar.jpg",
143-
url: "/team/trong/",
144-
title: "Lecturer (UET-VNU)",
145-
link: "https://sites.google.com/view/trongld",
146-
},
147-
{
148-
name: "Le Duy Dung, Andrew",
149-
image: "/uploads/2018/04/Andrew.jpg",
150-
url: "/team/andrew/",
151-
title: "Assistant Professor (VinUni)",
152-
link: "https://andrew-dungle.github.io/",
153-
},
154-
{
155-
name: "Le Trung Hoang",
156-
image: "/uploads/2018/06/hoangle_photo.png",
157-
url: "/team/hoang/",
158-
title: "Lecturer (HCMUS-VNU)",
159-
link: "https://lthoang.github.io/",
160-
},
161-
{
162-
name: "Lee Ween Jiann",
163-
image: "/uploads/2018/04/Potrait-2.jpg",
164-
url: "/team/ween/",
165-
title: "Assistant Principal AI Scientist (ST Engineering)",
166-
link: "https://www.linkedin.com/in/weenjiann/",
167-
},
168-
{
169-
name: "Maksim Tkachenko",
170-
image: "/uploads/2018/04/maksim2.png",
171-
url: "/team/maksim/",
172-
title: "General Manager, AI Research (Rakuten)",
173-
link: "http://www.mtkachenko.info/",
174-
},
175-
{
176-
name: "Tran Nhu Thuat",
177-
image: "/uploads/2020/08/photo_thuat2.jpg",
178-
url: "/team/thuat/",
179-
title: "",
180-
link: "https://www.linkedin.com/in/nhu-thuat-tran-84b549161/",
181-
},
182-
{
183-
name: "Truong Quoc Tuan",
184-
image: "/uploads/2018/04/photo_tuantruong.jpg",
185-
url: "/team/tuan/",
186-
title: "Senior ML Engineer (Pinterest)",
187-
link: "http://www.qttruong.com",
188-
},
189-
{
190-
name: "Zhang Ce",
191-
image: "/uploads/2018/10/张策的帅照.png",
192-
url: "/team/zhangce/",
193-
title: "Lecturer (University of Sheffield)",
194-
link: "https://sites.google.com/view/delvincezhang",
195-
},
196-
];
197-
19828
// Sort alumni alphabetically by name
199-
const alumni = [...alumniRaw].sort((a, b) => a.name.localeCompare(b.name));
29+
const alumni = [...TEAM_DATA.alumni].sort((a, b) =>
30+
a.name.localeCompare(b.name)
31+
);
20032

20133
function TeamMemberCard({ member }: { member: TeamMember }) {
20234
return (

src/data/team.tsx

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
export interface TeamMember {
2+
name: string;
3+
image: string;
4+
url: string;
5+
title: string;
6+
link?: string;
7+
}
8+
9+
export const TEAM_DATA = {
10+
professor: [
11+
{
12+
name: "Hady W. Lauw",
13+
image: "/uploads/2018/06/photo_hadylauw.png",
14+
url: "/team/hadylauw/",
15+
title: "Associate Professor (SMU)",
16+
link: "http://www.hadylauw.com",
17+
},
18+
],
19+
20+
staff: [
21+
{
22+
name: "Do Dinh Hieu",
23+
image: "/uploads/2020/08/photo_hieu2.jpg",
24+
url: "/team/hieu/",
25+
title: "Research Scientist (SMU)",
26+
link: "https://hieuddo.github.io/",
27+
},
28+
],
29+
30+
students: [
31+
{
32+
name: "Ezekiel Ong Young",
33+
image: "/uploads/2024/01/photo_ezekiel.jpg",
34+
url: "/team/ezekiel-ong-young/",
35+
title: "PhD Candidate (SMU)",
36+
link: "https://www.linkedin.com/in/ezekiel-young/",
37+
},
38+
{
39+
name: "Le Thi Phuong",
40+
image: "/uploads/2024/01/photo_phuong.jpg",
41+
url: "/team/le-thi-phuong/",
42+
title: "PhD Candidate (SMU)",
43+
link: "https://www.linkedin.com/in/phuonglt26/",
44+
},
45+
{
46+
name: "Lim Jia Peng",
47+
image: "/uploads/2020/12/photo_jiapeng.png",
48+
url: "/team/jiapeng/",
49+
title: "PhD Candidate (SMU)",
50+
link: "https://www.linkedin.com/in/jia-peng-lim",
51+
},
52+
{
53+
name: "Nguyen Minh Quang",
54+
image: "/uploads/2024/01/photo_quang.jpg",
55+
url: "/team/nguyen-minh-quang/",
56+
title: "PhD Candidate (SMU)",
57+
link: "https://www.linkedin.com/in/mquang-nguyen/",
58+
},
59+
{
60+
name: "Ngo Huu Manh Khanh",
61+
image: "",
62+
url: "",
63+
title: "PhD Candidate (SMU)",
64+
link: "",
65+
},
66+
{
67+
name: "Nguyen Quoc Trung, Derrick",
68+
image: "",
69+
url: "",
70+
title: "PhD Candidate (SMU)",
71+
link: "",
72+
},
73+
{
74+
name: "Dilan Dinushka",
75+
image: "/uploads/2023/05/photo_dilan.jpeg",
76+
url: "/team/dilan-dinushka/",
77+
title: "PhD co-supervisee (SMU)",
78+
link: "https://www.linkedin.com/in/ddsdinushka",
79+
},
80+
{
81+
name: "Dong Viet Hoang, Eric",
82+
image: "",
83+
url: "",
84+
title: "PhD co-supervisee (SMU)",
85+
link: "",
86+
},
87+
],
88+
89+
alumni: [
90+
{
91+
name: "Aghiles Salah",
92+
image: "/uploads/2018/04/ghiles.png",
93+
url: "/team/aghiles/",
94+
title: "Senior Research Scientist (Rakuten)",
95+
link: "http://saghiles.github.io/",
96+
},
97+
{
98+
name: "Chia Chong Cher",
99+
image: "/uploads/2018/06/headshot-square.png",
100+
url: "/team/chongcher/",
101+
title: "Senior Manager (Singapore Institute of Legal Education)",
102+
link: "https://www.linkedin.com/in/chongcher/",
103+
},
104+
{
105+
name: "Darryl Ong",
106+
image: "/uploads/2019/06/dp_400-1.jpg",
107+
url: "/team/darryl/",
108+
title: "Machine Learning Engineer (Hewlett Packard Enterprise)",
109+
link: "https://www.linkedin.com/in/ongrongsheng/",
110+
},
111+
{
112+
name: "Hongtuo Nie",
113+
image: "/uploads/2023/05/photo_hongtuonie.jpeg",
114+
url: "/team/hongtuo-nie/",
115+
title: "",
116+
link: "https://felixnie.github.io/",
117+
},
118+
{
119+
name: "Konstantinos Theocharidis",
120+
image: "/uploads/2023/05/photo_konstantinos.jpeg",
121+
url: "/team/konstantinos-theocharidis/",
122+
title: "",
123+
link: "https://www.linkedin.com/in/konstantinos-theocharidis-36299159/",
124+
},
125+
{
126+
name: "Le Duc Trong, Tony",
127+
image: "/uploads/2018/04/TrongLe_Avatar.jpg",
128+
url: "/team/trong/",
129+
title: "Lecturer (UET-VNU)",
130+
link: "https://sites.google.com/view/trongld",
131+
},
132+
{
133+
name: "Le Duy Dung, Andrew",
134+
image: "/uploads/2018/04/Andrew.jpg",
135+
url: "/team/andrew/",
136+
title: "Assistant Professor (VinUni)",
137+
link: "https://andrew-dungle.github.io/",
138+
},
139+
{
140+
name: "Le Trung Hoang",
141+
image: "/uploads/2018/06/hoangle_photo.png",
142+
url: "/team/hoang/",
143+
title: "Lecturer (HCMUS-VNU)",
144+
link: "https://lthoang.github.io/",
145+
},
146+
{
147+
name: "Lee Ween Jiann",
148+
image: "/uploads/2018/04/Potrait-2.jpg",
149+
url: "/team/ween/",
150+
title: "Assistant Principal AI Scientist (ST Engineering)",
151+
link: "https://www.linkedin.com/in/weenjiann/",
152+
},
153+
{
154+
name: "Maksim Tkachenko",
155+
image: "/uploads/2018/04/maksim2.png",
156+
url: "/team/maksim/",
157+
title: "General Manager, AI Research (Rakuten)",
158+
link: "http://www.mtkachenko.info/",
159+
},
160+
{
161+
name: "Tran Nhu Thuat",
162+
image: "/uploads/2020/08/photo_thuat2.jpg",
163+
url: "/team/thuat/",
164+
title: "",
165+
link: "https://www.linkedin.com/in/nhu-thuat-tran-84b549161/",
166+
},
167+
{
168+
name: "Truong Quoc Tuan",
169+
image: "/uploads/2018/04/photo_tuantruong.jpg",
170+
url: "/team/tuan/",
171+
title: "Senior ML Engineer (Pinterest)",
172+
link: "http://www.qttruong.com",
173+
},
174+
{
175+
name: "Zhang Ce",
176+
image: "/uploads/2018/10/张策的帅照.png",
177+
url: "/team/zhangce/",
178+
title: "Lecturer (University of Sheffield)",
179+
link: "https://sites.google.com/view/delvincezhang",
180+
},
181+
],
182+
} as const;

0 commit comments

Comments
 (0)