gatsby-matrix-theme 8.0.2 → 8.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,20 @@
1
+ ## [8.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v8.0.3...v8.0.4) (2022-10-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added first module prop in new title component ([a4bf904](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a4bf904d7ab162391a1ed90bdb15f09c46fe4bfb))
7
+
8
+
9
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([d904e26](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d904e266f07816badfa1ce10f10cbffc03bdab24))
10
+
11
+ ## [8.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v8.0.2...v8.0.3) (2022-10-21)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * fixed toplist title ([8932710](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/89327101d7de239f45c9a99030647a37d0749ada))
17
+
1
18
  ## [8.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v8.0.1...v8.0.2) (2022-10-21)
2
19
 
3
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -53,7 +53,7 @@ const TopList = ({
53
53
  <>
54
54
  {Title && (
55
55
  <div className={`${styles.tabsHeader} ${styles.titleAndTab}`}>
56
- <Title module={module} />
56
+ <Title isHomepageFirstModule={isHomepageFirstModule} module={module} />
57
57
  </div>
58
58
  )}
59
59
  {ModuleIntro && <ModuleIntro module={{ value: module.module_introduction }} />}
@@ -16,6 +16,7 @@ const Tabs = ({
16
16
  HeaderComp,
17
17
  headerClass = '',
18
18
  gtmClass = '',
19
+ isHomepageFirstModule = false,
19
20
  }) => {
20
21
  const showAllTabId = `${showAll}_0`;
21
22
  const [activeTab, setActiveTab] = useState(
@@ -36,7 +37,7 @@ const Tabs = ({
36
37
  <>
37
38
  <div className={tabHeaderClass}>
38
39
  <div className={styles.titleAndTab}>
39
- {Title && <Title module={module} />}
40
+ {Title && <Title isHomepageFirstModule={isHomepageFirstModule} module={module} />}
40
41
  {TabList && (
41
42
  <TabList
42
43
  siteName={siteName}
@@ -85,6 +86,7 @@ Tabs.propTypes = {
85
86
  module: PropTypes.shape({}),
86
87
  siteName: PropTypes.string,
87
88
  gtmClass: PropTypes.string,
89
+ isHomepageFirstModule: PropTypes.bool,
88
90
  };
89
91
 
90
92
  export default Tabs;
@@ -4,26 +4,24 @@
4
4
  /* eslint-disable import/no-extraneous-dependencies */
5
5
  import React, { useContext } from 'react';
6
6
  import PropTypes from 'prop-types';
7
- import loadable from '@loadable/component';
7
+ import { translate } from 'gatsby-core-theme/src/helpers/getters';
8
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
8
9
  import styles from './title.module.scss';
10
+ import { getDate } from '../../../../helpers/strings';
9
11
 
10
- const TabsTitle = ({ module }) => {
12
+ const TabsTitle = ({ module, isHomepageFirstModule }) => {
11
13
  const TitleTag = module?.module_title_tag
12
14
  ? `${module?.module_title_tag}`
13
15
  : module?.module_title
14
16
  ? 'span'
15
17
  : 'h2';
16
18
  const showDate = module?.show_last_updated_date;
17
- const { Context = {} } =
18
- showDate && loadable(() => import('gatsby-core-theme/src/context/TranslationsProvider'));
19
19
  const { translations } = useContext(Context) || {};
20
- const { translate } = showDate && loadable(() => import('gatsby-core-theme/src/helpers/getters'));
21
- const { getDate } = showDate && loadable(() => import('../../../../helpers/strings'));
22
20
  const { month, year } = showDate && getDate();
23
21
  const titleText = module?.module_title || module?.title;
24
22
 
25
23
  return (
26
- <TitleTag className={styles.noTag}>
24
+ <TitleTag className={`${styles.noTag} ${isHomepageFirstModule ? styles.firstModule : ''}`}>
27
25
  {module?.module_title_tag ? <div className={styles.title}>{titleText}</div> : titleText}
28
26
  {showDate && (
29
27
  <span className={styles.toplistDate}>
@@ -36,6 +34,7 @@ const TabsTitle = ({ module }) => {
36
34
  };
37
35
 
38
36
  TabsTitle.propTypes = {
37
+ isHomepageFirstModule: PropTypes.bool,
39
38
  module: PropTypes.shape({
40
39
  title: PropTypes.string,
41
40
  module_title: PropTypes.string,