gatsby-core-theme 40.0.3 → 40.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,3 +1,10 @@
|
|
|
1
|
+
## [40.0.4](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.3...v40.0.4) (2024-10-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* preview feature ([e01820d](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/e01820d1a5a543dd6209c78dd3826d9b13bf3ed4))
|
|
7
|
+
|
|
1
8
|
## [40.0.3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.2...v40.0.3) (2024-10-15)
|
|
2
9
|
|
|
3
10
|
|
package/gatsby-node.mjs
CHANGED
|
@@ -248,19 +248,6 @@ export const createPages = async ({ actions: { createPage } }, themeOptions) =>
|
|
|
248
248
|
// create every single page
|
|
249
249
|
Object.keys(processed.site_markets).forEach((siteMarket) => {
|
|
250
250
|
if (!processed.pages[siteMarket]['page']) processed.pages[siteMarket]['page'] = [];
|
|
251
|
-
processed.pages[siteMarket]['page'].push({
|
|
252
|
-
meta_title: 'Preview',
|
|
253
|
-
relation_type: 'page',
|
|
254
|
-
path: 'preview',
|
|
255
|
-
template: 'default',
|
|
256
|
-
meta_robots: ['noindex', 'nofollow'],
|
|
257
|
-
sections: {
|
|
258
|
-
main: { modules: [] },
|
|
259
|
-
navigation: { modules: [] },
|
|
260
|
-
sidebar: { modules: [] },
|
|
261
|
-
footer: { modules: [] },
|
|
262
|
-
},
|
|
263
|
-
});
|
|
264
251
|
let count = 0;
|
|
265
252
|
Object.keys(processed.pages[siteMarket]).forEach((pageType) => {
|
|
266
253
|
processed.pages[siteMarket][pageType].forEach((page) => {
|
|
@@ -271,10 +258,7 @@ export const createPages = async ({ actions: { createPage } }, themeOptions) =>
|
|
|
271
258
|
const processedPage = page;
|
|
272
259
|
processedPage.preconnect_links = preconnectLinks;
|
|
273
260
|
|
|
274
|
-
siteSchema =
|
|
275
|
-
page.path === 'preview'
|
|
276
|
-
? (page.siteSchema = Object.values(schemaData || {})[0])
|
|
277
|
-
: schemaData[page['market_id']];
|
|
261
|
+
siteSchema = schemaData[page['market_id']];
|
|
278
262
|
authors = response.authors;
|
|
279
263
|
|
|
280
264
|
// siteInfo, siteSchema and authors are added to page for schemaGenerator()
|
|
@@ -329,8 +313,7 @@ export const createPages = async ({ actions: { createPage } }, themeOptions) =>
|
|
|
329
313
|
path: `/${page.path}`,
|
|
330
314
|
component: `${__dirname}/src/components/app-ssr.js`,
|
|
331
315
|
context: {
|
|
332
|
-
...contextData
|
|
333
|
-
isPreview: page.path === 'preview',
|
|
316
|
+
...contextData
|
|
334
317
|
},
|
|
335
318
|
});
|
|
336
319
|
} else {
|
|
@@ -342,8 +325,7 @@ export const createPages = async ({ actions: { createPage } }, themeOptions) =>
|
|
|
342
325
|
path: page.path.charAt(0) === '/' ? page.path : `/${page.path}`,
|
|
343
326
|
component,
|
|
344
327
|
context: {
|
|
345
|
-
...contextData
|
|
346
|
-
isPreview: page.path === 'preview',
|
|
328
|
+
...contextData
|
|
347
329
|
},
|
|
348
330
|
});
|
|
349
331
|
}
|
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ const Footer = (props) => {
|
|
|
47
47
|
const getFooterLogos = () => {
|
|
48
48
|
let refactoredFooterLogos = { children: [] };
|
|
49
49
|
|
|
50
|
-
if (footerLogos === null) {
|
|
50
|
+
if (footerLogos === null || !footerLogos.children) {
|
|
51
51
|
refactoredFooterLogos = {
|
|
52
52
|
children: [...page?.page?.responsibleGaming],
|
|
53
53
|
};
|
|
@@ -8,7 +8,7 @@ import {getData} from '~helpers/api'
|
|
|
8
8
|
import processor from "./processor/index.mjs";
|
|
9
9
|
import { fetchSiteSettings } from './fetch-site-settings.mjs';
|
|
10
10
|
|
|
11
|
-
export async function getAPIData(page, url, preview) {
|
|
11
|
+
export async function getAPIData(page, url, headers, preview) {
|
|
12
12
|
if (preview) {
|
|
13
13
|
try {
|
|
14
14
|
const siteName = process.env.GATSBY_SITE_NAME;
|
|
@@ -37,7 +37,6 @@ const AppSSR = ({serverData }) => {
|
|
|
37
37
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
38
|
}, []);
|
|
39
39
|
|
|
40
|
-
|
|
41
40
|
return (
|
|
42
41
|
<>
|
|
43
42
|
<MainProvider
|
|
@@ -88,8 +87,7 @@ export async function getServerData(props) {
|
|
|
88
87
|
// eslint-disable-next-line no-shadow
|
|
89
88
|
const { pageContext, url, headers } = props;
|
|
90
89
|
let res = "";
|
|
91
|
-
|
|
92
|
-
res = await getAPIData(pageContext.page, url, headers, preview);
|
|
90
|
+
res = await getAPIData(pageContext.page, url, headers, true);
|
|
93
91
|
|
|
94
92
|
return res;
|
|
95
93
|
}
|