Skip to content

Commit

Permalink
add devpost link to org table
Browse files Browse the repository at this point in the history
  • Loading branch information
zineanteoh committed Oct 29, 2023
1 parent bc39b51 commit f4895ba
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions components/judges/schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,18 @@ export default function OrganizerSchedule(props: ScheduleProps) {
let { data, sessionTimeStart, sessionTimeEnd } = props;

const teams = useMemo(
() => [...new Set(data.filter(x => x.team !== null && x.team.name !== null).map(x => x.team.name))],
() => [
...new Set(
data
.filter(x => x.team !== null && x.team.name !== null)
.map(x => {
return {
name: x.team.name,
devpost: x.team.devpost,
};
})
),
],
[data]
);

Expand All @@ -84,14 +95,14 @@ export default function OrganizerSchedule(props: ScheduleProps) {
render: (time: string) => DateTime.fromISO(time).toLocaleString(DateTime.TIME_SIMPLE),
},
...teams
.map(teamName => {
.map((team: any) => {
let locationNum = data
.filter(x => x.team !== null && x.team.name !== null)
.find(x => x.team.name === teamName)?.team.locationNum;
.find(x => x.team.name === team.name)?.team.locationNum;
return {
title: (teamName as string) + ' (Table ' + locationNum + ')',
dataIndex: teamName as string,
key: teamName as string,
title: <a href={team.devpost}>{(team.name as string) + ' (Table ' + locationNum + ')'}</a>,
dataIndex: team.name as string,
key: team.name as string,
render: TableCell,
locationNum: locationNum,
};
Expand Down

1 comment on commit f4895ba

@vercel
Copy link

@vercel vercel bot commented on f4895ba Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.