Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/schedule/ScheduleContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export default function ScheduleContainer({ initialSchedule, year }: Readonly<Sc
return initialSchedule;
}

const filterSessions = (sessions: GridSession[]) => sessions.filter((s) => savedSessionIds.includes(s.id) || s.isServiceSession);
const savedIdsSet = new Set(savedSessionIds);
const filterSessions = (sessions: GridSession[]) => sessions.filter((s) => savedIdsSet.has(s.id) || s.isServiceSession);

return initialSchedule.map((day) => ({
...day,
Expand Down
3 changes: 2 additions & 1 deletion hooks/useTalks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export const groupTalksByTrack = (talks: Talk[]): Map<string, Talk[]> => {
*/
export const getTalkSpeakersWithDetails = async (year: string | number, speakerIds: string[]): Promise<Speaker[]> => {
const speakers = await getSpeakers(year);
return speakers.filter((s) => speakerIds.includes(s.id));
const speakerIdsSet = new Set(speakerIds);
return speakers.filter((s) => speakerIdsSet.has(s.id));
};

export const getRelatedTalksByTrack = async (year: string | number, track: string, excludeTalkId: string, limit: number = 5): Promise<Talk[]> => {
Expand Down
Loading