gatsby-core-theme 7.0.1 → 7.0.2

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,3 +1,19 @@
1
+ ## [7.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v7.0.1...v7.0.2) (2022-05-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * page reviewer ([9da597d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9da597d06663be779246df5980d253de69d23c73))
7
+
8
+
9
+ ### Code Refactoring
10
+
11
+ * responsive ([42584ab](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/42584ab72bd1c21f3281f883b30944a6d96823fa))
12
+ * update preview page schema ([dad9e57](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/dad9e57f66cc415fdece510ae9e345095075f269))
13
+
14
+
15
+ * Merge branch 'tm-2708-update-preview-page-schema' into 'master' ([f35aaef](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f35aaef331cc2dc039624d34c97a7b86531a7660))
16
+
1
17
  ## [7.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v7.0.0...v7.0.1) (2022-05-05)
2
18
 
3
19
 
@@ -197,7 +197,10 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
197
197
  const processedPage = page;
198
198
  processedPage.preconnect_links = preconnectLinks;
199
199
 
200
- siteSchema = response.schema[page['market_id']];
200
+ siteSchema =
201
+ page.path === 'preview'
202
+ ? (page.siteSchema = Object.values(response.schema || {})[0])
203
+ : response.schema[page['market_id']];
201
204
  authors = response.authors;
202
205
 
203
206
  page.translations = {};
@@ -222,6 +225,7 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
222
225
  marketSections,
223
226
  prefilledModules,
224
227
  siteInfo,
228
+ siteSchema,
225
229
  translations,
226
230
  authors,
227
231
  ...themeOptions,
@@ -241,7 +245,6 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
241
245
  component: require.resolve('./src/components/app.js'),
242
246
  context: {
243
247
  ...contextData,
244
- siteSchema,
245
248
  isPreview: page.path === 'preview',
246
249
  },
247
250
  });
@@ -255,7 +258,7 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
255
258
  (processed.relations &&
256
259
  processed.relations.sports_data &&
257
260
  processed.relations.sports_data.providers) ||
258
- {}
261
+ {}
259
262
  ).forEach((providerId) => {
260
263
  const provider = processed.relations.sports_data.providers[providerId];
261
264
  const tracker = generateTrackerLink(provider, 'main');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -19,6 +19,11 @@ const App = ({ pageContext }) => {
19
19
  !staticPath ? searchParams.get('path') || '/' : staticPath,
20
20
  pageContext
21
21
  ).then((previewResponse) => {
22
+ if (previewResponse.page) {
23
+ // siteInfo and siteSchema are added to page for schemaGenerator()
24
+ previewResponse.page.siteInfo = pageContext.siteInfo;
25
+ previewResponse.page.siteSchema = pageContext.siteSchema;
26
+ }
22
27
  setPreviewContext(previewResponse);
23
28
  setIsLoading(false);
24
29
  });
@@ -85,6 +90,9 @@ App.propTypes = {
85
90
  site_logo: PropTypes.string,
86
91
  site_name: PropTypes.string,
87
92
  }),
93
+ siteSchema: PropTypes.shape({
94
+ site_name: PropTypes.string,
95
+ }),
88
96
  }),
89
97
  };
90
98
 
@@ -39,6 +39,10 @@
39
39
  font-weight: bold;
40
40
  }
41
41
  }
42
+
43
+ @include max(mobile){
44
+ flex-direction: column;
45
+ }
42
46
  }
43
47
  }
44
48
  }
@@ -249,10 +249,8 @@ export default {
249
249
  }
250
250
 
251
251
  // add reviewer object to page
252
- if (page.reviewer !== null && Object.values(data.authors).length) {
253
- transformedPages[market][pageType][index].reviewer = Object.values(data.authors).find(
254
- (each) => each.name === page.reviewer
255
- );
252
+ if (page.reviewer_id !== null && Object.values(data.authors).length) {
253
+ transformedPages[market][pageType][index].reviewer = data.authors[page.reviewer_id];
256
254
  }
257
255
 
258
256
  // add breadcrumbs array to page