Skip to content

Commit

Permalink
make tags work on PC
Browse files Browse the repository at this point in the history
  • Loading branch information
McFrid committed Oct 10, 2024
1 parent b38add8 commit b377571
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus-reactive/graphql-content-layer",
"version": "3.1.27",
"version": "3.1.28",
"private": false,
"main": "dist/index.js",
"scripts": {
Expand Down
21 changes: 15 additions & 6 deletions src/fetch-committee.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@ const { prepareSpeakers, trySelectSettings } = require('./utils');
const { personFragment } = require('./fragments');
const { getCommittee } = require('./http-utils');

const selectSettings = trySelectSettings(s => s.speakerAvatar.dimensions, {
avatarWidth: 500,
avatarHeight: 500,
});
const selectSettings = trySelectSettings(
s => ({
...s.speakerAvatar.dimensions,
tagColors: s.tagColors,
labelColors: s.labelColors,
}),
{
avatarWidth: 500,
avatarHeight: 500,
tagColors: {},
},
);

const queryPages = /* GraphQL */ `
query(
Expand All @@ -30,7 +38,7 @@ const queryPages = /* GraphQL */ `
${personFragment}
`;

const fetchData = async (client, vars) => {
const fetchData = async (client, { tagColors, labelColors, ...vars }) => {
const data = await client.request(queryPages, vars).then(res => ({
...res.conf.year[0],
}));
Expand All @@ -48,7 +56,8 @@ const fetchData = async (client, vars) => {
const speakers = await Promise.all(
prepareSpeakers(
rawCommittee.map(speaker => ({ ...speaker, decor: true })),
{},
tagColors,
labelColors,
),
);

Expand Down

0 comments on commit b377571

Please sign in to comment.