@openeventkit/event-site 2.0.49 → 2.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gatsby-node.js CHANGED
@@ -225,7 +225,7 @@ exports.onPreBootstrap = async () => {
225
225
 
226
226
  const summitId = process.env.GATSBY_SUMMIT_ID;
227
227
  const summitApiBaseUrl = process.env.GATSBY_SUMMIT_API_BASE_URL;
228
- const marketingSettings = await SSR_getMarketingSettings(process.env.GATSBY_MARKETING_API_BASE_URL, summitId);
228
+ let marketingSettings = await SSR_getMarketingSettings(process.env.GATSBY_MARKETING_API_BASE_URL, summitId);
229
229
  const colorSettings = fs.existsSync(COLORS_FILE_PATH) ? JSON.parse(fs.readFileSync(COLORS_FILE_PATH)) : require(`./${DEFAULT_COLORS_FILE_PATH}`);
230
230
  const globalSettings = fs.existsSync(SITE_SETTINGS_FILE_PATH) ? JSON.parse(fs.readFileSync(SITE_SETTINGS_FILE_PATH)) : {};
231
231
  const lobbyPageSettings = fs.existsSync(LOBBY_PAGE_FILE_PATH) ? JSON.parse(fs.readFileSync(LOBBY_PAGE_FILE_PATH)) : {};
@@ -247,9 +247,12 @@ exports.onPreBootstrap = async () => {
247
247
 
248
248
  const accessToken = await getAccessToken(config, process.env.GATSBY_BUILD_SCOPES).then(({ token }) => token.access_token);
249
249
 
250
+ const FileType = 'FILE';
250
251
  // extract colors from marketing settings
251
- marketingSettings.map(({ key, value }) => {
252
- if (key.startsWith("color_")) colorSettings[key] = value;
252
+ marketingSettings = marketingSettings.map( entry => {
253
+ if (entry.key.startsWith("color_")) colorSettings[entry.key] = entry.value;
254
+ if(entry.type === FileType) return {...entry, value: entry.file};
255
+ return {...entry};
253
256
  });
254
257
 
255
258
  // create required directories
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.49",
4
+ "version": "2.0.51",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@mui/base": "^5.0.0-alpha.114",
@@ -85,7 +85,7 @@
85
85
  display: flex;
86
86
  gap: 15px;
87
87
  width: 90px;
88
- color: $color-primary-contrast;
88
+ color: var(--color_text_dark);
89
89
  flex-direction: column;
90
90
 
91
91
  .ticket-popup-row-icon {
@@ -21,15 +21,13 @@ export const MARKETING_SETTINGS_KEYS = {
21
21
  regLiteNoAllowedTicketsMessage: "REG_LITE_NO_ALLOWED_TICKETS_MESSAGE",
22
22
  }
23
23
 
24
- const FileType = 'FILE';
24
+
25
25
  const marketingSettingsQuery = graphql`
26
26
  query {
27
27
  allMarketingSettingsJson {
28
28
  nodes {
29
29
  key
30
- type
31
30
  value
32
- file
33
31
  }
34
32
  }
35
33
  }
@@ -37,11 +35,8 @@ const marketingSettingsQuery = graphql`
37
35
 
38
36
  const useMarketingSettings = () => {
39
37
  const { allMarketingSettingsJson } = useStaticQuery(marketingSettingsQuery);
40
- const getSettingByKey = (key) => {
41
- const node = allMarketingSettingsJson.nodes.find(setting => setting.key === key);
42
- if(!node) return null;
43
- return node.type === FileType ? node?.file : node?.value;
44
- }
38
+ const getSettingByKey = (key) =>
39
+ allMarketingSettingsJson.nodes.find(setting => setting.key === key)?.value;
45
40
  return { getSettingByKey };
46
41
  };
47
42