gatsby-core-theme 12.0.4-beta.2 → 12.0.4

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/CHANGELOG.md CHANGED
@@ -1,22 +1,12 @@
1
- ## [12.0.4-beta.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.4-beta.1...v12.0.4-beta.2) (2022-10-12)
1
+ ## [12.0.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.3...v12.0.4) (2022-10-13)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * livestream providers tracker fix ([59424e7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/59424e77caa4768e1adc608aeaafb541fd5c4c0e))
6
+ * old schema ([9650bd5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9650bd5e149cbf5f917d41564e2b7bfaa7eee8ea))
7
7
 
8
8
 
9
- * Merge branch 'tm-3082-tracker-links' into 'beta' ([b7c650c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b7c650c52bf7aee45ed96d613df69c451ae4d569))
10
-
11
- ## [12.0.4-beta.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.3...v12.0.4-beta.1) (2022-10-12)
12
-
13
-
14
- ### Bug Fixes
15
-
16
- * chnaged logic for live stream tracker links ([5efb851](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5efb851401b8f99722ef2491514d2f08329ecef7))
17
-
18
-
19
- * Merge branch 'tm-3082-tracker-links' into 'beta' ([109371d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/109371d239ca8765afa649227a858a4ae2edc174))
9
+ * Merge branch 'tm-2833-old-schema' into 'master' ([ed9e83e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ed9e83e26392f5f7d58e8427c6f0c8cdc4ef9037))
20
10
 
21
11
  ## [12.0.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.2...v12.0.3) (2022-10-10)
22
12
 
@@ -291,7 +291,7 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
291
291
  {}
292
292
  ).forEach((providerId) => {
293
293
  const provider = processed.relations.sports_data.providers[providerId];
294
- const tracker = generateTrackerLink(provider, 'main', true);
294
+ const tracker = generateTrackerLink(provider, 'main');
295
295
  const trackerPageObject = {
296
296
  meta_title: 'Tracker',
297
297
  template: 'tracker',
@@ -309,47 +309,45 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
309
309
  siteInfo,
310
310
  provider,
311
311
  isTracker: true,
312
- isLiveStreamProvider: true,
313
312
  meta_robots: ['noindex', 'nofollow'],
314
313
  },
315
314
  });
316
315
  });
317
- }
318
-
319
- Object.keys(operators || {}).forEach((operatorId) => {
320
- const operator = operators[operatorId];
321
- const trackerLinks = Object.keys(operator.links);
322
- const tracker = trackerLinks.map((key) =>
323
- operator.links[key]
324
- ? generateTrackerLink(operator, key).toLowerCase().replace(' ', '_')
325
- : null
326
- );
327
- tracker.forEach((trackerPath) => {
328
- // Create splash page
329
- if (trackerPath) {
330
- const trackerPageObject = {
331
- meta_title: 'Tracker',
332
- template: 'tracker',
333
- title: 'Tracker',
334
- type: 'page',
335
- language: languageKey,
336
- path: trackerPath,
337
- meta_robots: ['noindex', 'nofollow'],
338
- };
339
- createPage({
340
- path: trackerPath,
341
- component: require.resolve('./src/components/app.js'),
342
- context: {
343
- page: trackerPageObject,
344
- siteInfo,
345
- operator,
346
- isTracker: true,
347
- isLiveStreamProvider: false,
348
- },
349
- });
350
- }
316
+ } else {
317
+ Object.keys(operators || {}).forEach((operatorId) => {
318
+ const operator = operators[operatorId];
319
+ const trackerLinks = Object.keys(operator.links);
320
+ const tracker = trackerLinks.map((key) =>
321
+ operator.links[key]
322
+ ? generateTrackerLink(operator, key).toLowerCase().replace(' ', '_')
323
+ : null
324
+ );
325
+ tracker.forEach((trackerPath) => {
326
+ // Create splash page
327
+ if (trackerPath) {
328
+ const trackerPageObject = {
329
+ meta_title: 'Tracker',
330
+ template: 'tracker',
331
+ title: 'Tracker',
332
+ type: 'page',
333
+ language: languageKey,
334
+ path: trackerPath,
335
+ meta_robots: ['noindex', 'nofollow'],
336
+ };
337
+ createPage({
338
+ path: trackerPath,
339
+ component: require.resolve('./src/components/app.js'),
340
+ context: {
341
+ page: trackerPageObject,
342
+ siteInfo,
343
+ operator,
344
+ isTracker: true,
345
+ },
346
+ });
347
+ }
348
+ });
351
349
  });
352
- });
350
+ }
353
351
  };
354
352
 
355
353
  exports.onCreatePage = ({ page, actions }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "12.0.4-beta.2",
3
+ "version": "12.0.4",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -1,12 +1,8 @@
1
1
  import { months } from '../constants/common';
2
2
 
3
- export function generateTrackerLink(operator, trackerType, provider = false) {
4
- const defaultTrackerFormat = provider
5
- ? process.env.PROVIDER_TRACKER_LINK_FORMAT_MAIN
6
- : process.env.TRACKER_LINK_FORMAT_MAIN;
7
- const trackerFormat = provider
8
- ? process.env.PROVIDER_TRACKER_LINK_FORMAT_NON_MAIN
9
- : process.env.TRACKER_LINK_FORMAT_NON_MAIN;
3
+ export function generateTrackerLink(operator, trackerType) {
4
+ const defaultTrackerFormat = process.env.TRACKER_LINK_FORMAT_MAIN;
5
+ const trackerFormat = process.env.TRACKER_LINK_FORMAT_NON_MAIN;
10
6
 
11
7
  if (defaultTrackerFormat && trackerFormat) {
12
8
  const linkFormatArray =
@@ -177,7 +177,7 @@ export function getPageImage(page) {
177
177
  return null;
178
178
  }
179
179
 
180
- export function prettyTracker(operator, trackerType = 'main', provider = false) {
180
+ export function prettyTracker(operator, trackerType = 'main') {
181
181
  if (!operator || !operator.short_name) {
182
182
  return null;
183
183
  }
@@ -190,7 +190,7 @@ export function prettyTracker(operator, trackerType = 'main', provider = false)
190
190
  trackerType = 'main';
191
191
  }
192
192
 
193
- return generateTrackerLink(operator, trackerType, provider);
193
+ return generateTrackerLink(operator, trackerType);
194
194
  }
195
195
 
196
196
  export function getBonus(name, operator) {