gatsby-core-theme 42.0.19 → 42.0.20
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 +8 -0
- package/package.json +1 -1
- package/src/components/app.js +13 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [42.0.20](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v42.0.19...v42.0.20) (2025-02-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added option to exclude footer from body ([ed9a8fa](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ed9a8fa3d1978d7cadc1ba76b605c9a6939e47fa))
|
|
7
|
+
* logic for inclusion ([af78d03](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/af78d0378d3b894e574670da82c20eafa2ead963))
|
|
8
|
+
|
|
1
9
|
## [42.0.19](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v42.0.18...v42.0.19) (2025-02-24)
|
|
2
10
|
|
|
3
11
|
|
package/package.json
CHANGED
package/src/components/app.js
CHANGED
|
@@ -7,10 +7,21 @@ import MainProvider from '~context/MainProvider';
|
|
|
7
7
|
import { getCookie } from "~helpers/cookies";
|
|
8
8
|
import Body from '~pages/body';
|
|
9
9
|
import HeadData from '~organisms/head';
|
|
10
|
+
import Footer from "~molecules/footer";
|
|
11
|
+
import { getMarketSection } from "~helpers/getters";
|
|
12
|
+
import { pageTypes } from '../constants/site-settings/navigation';
|
|
13
|
+
|
|
14
|
+
export const Head = ({ pageContext }) => (
|
|
15
|
+
<HeadData page={pageContext.page} siteInfo={pageContext.siteInfo} />
|
|
16
|
+
);
|
|
10
17
|
|
|
11
18
|
const App = ({ pageContext }) => {
|
|
12
19
|
|
|
13
20
|
const [isAdmin, setIsAdmin] = useState(false);
|
|
21
|
+
const excludeFooterFromBody = pageTypes[pageContext?.page?.template]?.excludeFooterFromBody ?? pageTypes?.default?.excludeFooterFromBody;
|
|
22
|
+
const footer = pageTypes[pageContext?.page?.template]?.disableFooter || !excludeFooterFromBody
|
|
23
|
+
? null
|
|
24
|
+
: getMarketSection("footer", pageContext);
|
|
14
25
|
|
|
15
26
|
const data = useStaticQuery(graphql`
|
|
16
27
|
query {
|
|
@@ -49,14 +60,12 @@ const App = ({ pageContext }) => {
|
|
|
49
60
|
>
|
|
50
61
|
<Body pageContext={pageContext} />
|
|
51
62
|
</div>
|
|
63
|
+
{excludeFooterFromBody && <Footer footerTemplate={footer?.style} template={pageContext?.page?.template} section={footer} />}
|
|
64
|
+
|
|
52
65
|
</MainProvider>
|
|
53
66
|
);
|
|
54
67
|
};
|
|
55
68
|
|
|
56
|
-
export const Head = ({ pageContext }) => (
|
|
57
|
-
<HeadData page={pageContext.page} siteInfo={pageContext.siteInfo} />
|
|
58
|
-
);
|
|
59
|
-
|
|
60
69
|
App.propTypes = {
|
|
61
70
|
pageContext: PropTypes.shape({
|
|
62
71
|
siteName: PropTypes.string,
|