Remove Bill from Syscom + Fix Andrew's picture (#226)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Fixes #196 https://csclub.uwaterloo.ca/~a3thakra/csc/adi-fix-syscom/about/team/ Reviewed-on: #226 Reviewed-by: Max Erenberg <merenber@csclub.uwaterloo.ca> Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca> Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
This commit is contained in:
parent
1074c22cb5
commit
9c6d5ccf16
|
@ -5,11 +5,8 @@
|
|||
},
|
||||
{
|
||||
"name": "Andrew Wang",
|
||||
"role": "Member"
|
||||
},
|
||||
{
|
||||
"name": "Bill Xiang",
|
||||
"role": "Member"
|
||||
"role": "Member",
|
||||
"image": "/images/team/AndrewWang-Syscom.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Raymond Li",
|
||||
|
|
|
@ -22,7 +22,9 @@ export async function getExecNames() {
|
|||
export async function getExec(fileName: string, convert = true) {
|
||||
const raw = await readFile(path.join(EXECS_PATH, `${fileName}${fileType}`));
|
||||
const { content, data: metadata } = matter(raw);
|
||||
const image = await getMemberImagePath(metadata.name);
|
||||
const image =
|
||||
(metadata.image as string | undefined) ??
|
||||
(await getMemberImagePath(metadata.name));
|
||||
|
||||
return {
|
||||
content: convert ? await serialize(content) : content,
|
||||
|
|
|
@ -110,10 +110,12 @@ function MembersList(props: MembersProps) {
|
|||
);
|
||||
}
|
||||
|
||||
async function getTeamWithImages(team: Omit<Metadata, "image">[]) {
|
||||
type TeamMember = Omit<Metadata, "image"> & { image?: string };
|
||||
|
||||
async function getTeamWithImages(team: TeamMember[]) {
|
||||
return await Promise.all(
|
||||
team.map(async (member) => {
|
||||
const image = await getMemberImagePath(member.name);
|
||||
const image = member.image ?? (await getMemberImagePath(member.name));
|
||||
return {
|
||||
...member,
|
||||
image,
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 907 KiB |
Loading…
Reference in New Issue