2023-02-06 16:26:09 +01:00
|
|
|
const peopleMapper = {
|
|
|
|
"Radek Svarz": { country: "cz" },
|
2023-02-06 16:38:34 +01:00
|
|
|
"Naim Ashhab": { country: "cz" },
|
2023-02-13 20:12:09 +01:00
|
|
|
"Marc Zeller": { country: "fr", twitter: "lemiscate" },
|
|
|
|
"Sasha Tanase": { country: "ro" },
|
|
|
|
"Rosco Kalis": { country: "nl" },
|
|
|
|
"Will Harborne": { country: "gb" },
|
|
|
|
"Anna George": { country: "pt" },
|
2023-03-15 15:26:33 +01:00
|
|
|
"Julien Bouteloup": { country: "ch" },
|
2023-03-25 02:15:54 +01:00
|
|
|
//"Stanislav Šimek": { country: "cz" }
|
2023-02-06 16:26:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export async function data($) {
|
|
|
|
const res = await $.loadJSONUrl(
|
|
|
|
"https://graphql.contentful.com/content/v1/spaces/6j1me6tz5h39/environments/master",
|
|
|
|
{
|
|
|
|
method: "POST",
|
|
|
|
body: JSON.stringify({
|
2023-03-25 02:15:54 +01:00
|
|
|
query: `
|
|
|
|
{
|
|
|
|
pragueDefiSummitPeopleSortedCollection(limit: 1) {
|
|
|
|
items {
|
|
|
|
pdsPeopleSortedCollection {
|
|
|
|
items {
|
|
|
|
sys { id }
|
|
|
|
... on PragueDefiSummitPeople {
|
|
|
|
sys { id }
|
|
|
|
name
|
|
|
|
twitter
|
|
|
|
company
|
|
|
|
role
|
|
|
|
profileImage {
|
|
|
|
sys {
|
|
|
|
publishedAt
|
|
|
|
id
|
|
|
|
}
|
|
|
|
fileName
|
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-04-07 00:09:13 +02:00
|
|
|
}`,
|
2023-02-06 16:26:09 +01:00
|
|
|
}),
|
|
|
|
headers: {
|
|
|
|
"content-type": "application/json",
|
|
|
|
authorization: "Bearer 7xdKQm9l5CXQE6tXXKYxNQ_lgvanmpdUgT20pIlxfOk",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
return {
|
2023-04-07 00:09:13 +02:00
|
|
|
speakers: res.data.pragueDefiSummitPeopleSortedCollection.items[0]
|
|
|
|
.pdsPeopleSortedCollection.items.map((s) =>
|
|
|
|
Object.assign({
|
|
|
|
id: $.formatId(s.name),
|
|
|
|
name: s.name,
|
|
|
|
twitter: s.twitter.replace("https://twitter.com/", ""),
|
|
|
|
caption: s.company || "",
|
|
|
|
photoUrl: s.profileImage?.url,
|
|
|
|
}, peopleMapper[s.name] || {})
|
|
|
|
),
|
2023-02-06 16:26:09 +01:00
|
|
|
};
|
|
|
|
}
|