Skip to content

Commit

Permalink
add allTalks to speakers
Browse files Browse the repository at this point in the history
  • Loading branch information
lero62 committed Sep 10, 2024
1 parent 94e5eaa commit f3d8883
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/fetch-speakers.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ const fetchData = async (client, { tagColors, labelColors, ...vars }) => {
console.log('invalid speaker', JSON.stringify(speaker));
}

const { activities, offlineActivities, ...restSpeakerData } = speaker;
const {
activities,
offlineActivities,
allActivities,
...restSpeakerData
} = speaker;

return {
...restSpeakerData,
Expand All @@ -183,6 +188,12 @@ const fetchData = async (client, { tagColors, labelColors, ...vars }) => {
? offlineActivities.talks.map(convertDateToIso)
: []),
],
allTalks: [
...(allActivities
? allActivities.lightningTalks.map(convertDateToIso)
: []),
...(allActivities ? allActivities.talks.map(convertDateToIso) : []),
],
},
};
});
Expand Down
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const createSlug = (object, type) => {
talk: obj => obj.title,
talks: obj => obj.title,
offlineTalks: obj => obj.title,
allTalks: obj => obj.title,
workshop: obj => obj.title,
workshops: obj => obj.title,
other: obj => {
Expand Down

0 comments on commit f3d8883

Please sign in to comment.