gatsby-core-theme 44.18.1 → 44.18.3

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,24 @@
1
+ ## [44.18.3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.18.2...v44.18.3) (2026-03-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix cards not showing when js is disabled ([0411267](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/04112671452e7ab0e99b3c9b401a84e823c85149))
7
+ * rename variable ([eda27ba](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/eda27ba680c6e6bd5d09aa2788fbcc11b6a1479e))
8
+
9
+
10
+ * Merge branch 'fix-cards-not-showing-when-js-is-disabled' into 'master' ([514989f](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/514989f0014af8e6973cb17a9c7f1ae97ea7a657))
11
+
12
+ ## [44.18.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.18.1...v44.18.2) (2026-03-12)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * update breadcrumbs to include a function for vanity label ([7c796f7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/7c796f7f6bfd318bafd1e2ec941a4a704af0ed59))
18
+
19
+
20
+ * Merge branch 'vanity_label' into 'master' ([4291354](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4291354003a092c24ebe442d7809b55559ef7bb7))
21
+
1
22
  ## [44.18.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.18.0...v44.18.1) (2026-03-11)
2
23
 
3
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.18.1",
3
+ "version": "44.18.3",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -3,7 +3,7 @@ import React from "react";
3
3
 
4
4
  import PropTypes from "prop-types";
5
5
  import Link from "~hooks/link";
6
-
6
+ import { generatePlaceholderString } from "~helpers/generators.mjs";
7
7
  import styles from "./breadcrumbs.module.scss";
8
8
  import keygen from "~helpers/keygen";
9
9
  import { excludeTemplates } from "../../../constants/excluded.mjs";
@@ -74,7 +74,7 @@ function Breadcrumbs({
74
74
  </li>
75
75
  ))}
76
76
  <li aria-current="page" className={styles.item || ""}>
77
- {page.vanity_label ? page.vanity_label : page.title}
77
+ {page.vanity_label ? generatePlaceholderString(page.vanity_label) : page.title}
78
78
  </li>
79
79
  </ol>
80
80
  );
@@ -1,4 +1,4 @@
1
- import { useEffect, useState } from "react";
1
+ import { useCallback, useEffect, useState } from "react";
2
2
 
3
3
  const useLoadMore = ({
4
4
  items = [],
@@ -6,28 +6,28 @@ const useLoadMore = ({
6
6
  initialLimit = 9,
7
7
  increment = initialLimit,
8
8
  }) => {
9
- const [visibleItems, setVisibleItems] = useState([]);
9
+ const getInitialItems = useCallback(
10
+ () => (enabled ? items.slice(0, initialLimit) : items),
11
+ [enabled, items, initialLimit]
12
+ );
10
13
 
11
- useEffect(() => {
12
- if (!enabled) {
13
- setVisibleItems(items)
14
- return;
15
- }
14
+ const [visibleItems, setVisibleItems] = useState(getInitialItems);
16
15
 
17
- setVisibleItems(items.slice(0, initialLimit));
18
- }, [items, enabled, initialLimit])
16
+ useEffect(() => {
17
+ setVisibleItems(getInitialItems());
18
+ }, [getInitialItems]);
19
19
 
20
20
  const loadMore = () => {
21
- setVisibleItems((prev) => items.slice(0, Math.min(prev.length + increment, items.length)))
22
- }
21
+ setVisibleItems((prev) => items.slice(0, Math.min(prev.length + increment, items.length)));
22
+ };
23
23
 
24
24
  const hasMore = visibleItems.length < items.length;
25
25
 
26
26
  return {
27
27
  items: visibleItems,
28
28
  loadMore,
29
- hasMore
30
- }
29
+ hasMore,
30
+ };
31
31
  };
32
32
 
33
- export default useLoadMore
33
+ export default useLoadMore;
@@ -1,4 +1,6 @@
1
1
  import { renderHook, act } from "@testing-library/react";
2
+ import React from "react";
3
+ import { renderToString } from "react-dom/server.node";
2
4
  import useLoadMore from "./index";
3
5
 
4
6
  describe("useLoadMore hook", () => {
@@ -81,4 +83,20 @@ describe("useLoadMore hook", () => {
81
83
  expect(result.current.items).toEqual(items);
82
84
  expect(result.current.hasMore).toBe(false);
83
85
  });
86
+
87
+ test("returns initial items during SSR render (without running effects)", () => {
88
+ const HookConsumer = () => {
89
+ const { items: visible } = useLoadMore({
90
+ items,
91
+ enabled: true,
92
+ initialLimit: 3,
93
+ increment: 2,
94
+ });
95
+
96
+ return React.createElement("div", null, visible.join(","));
97
+ };
98
+
99
+ const html = renderToString(React.createElement(HookConsumer));
100
+ expect(html).toContain("1,2,3");
101
+ });
84
102
  });
@@ -648,8 +648,10 @@ export default {
648
648
 
649
649
  if (shouldSkip) return;
650
650
  }
651
- const isInactiveGame = page?.relation?.type === "game" || page?.relation?.status === "active";
652
- if (isInactiveGame && res === "pre_main_games") return;
651
+
652
+ //pre main games section will show only on inactive game page
653
+ const isActiveGamePage = page?.relation?.type === "game" || page?.relation?.status === "active";
654
+ if (isActiveGamePage && res === "pre_main_games") return;
653
655
 
654
656
  res === "pre_main_operators" || res === "pre_main_games"
655
657
  ? page.sections.main.modules.unshift(cloneDeep(item))