gatsby-matrix-theme 7.1.14 → 7.1.15

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.1.15](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.14...v7.1.15) (2022-05-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add translate for toggle button ([0464483](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0464483c2ac776aee2b9d461a72c737b6d8fee6b))
7
+ * fixed logic of anchor ([0c45039](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0c450393bfe8c9deb00569115773367efc48558d))
8
+ * udpate variantone to expect prop ([bbac40d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bbac40d3f5242b1a5443a544248f3accf2da0c5c))
9
+ * update showLaunchDate ([9eaf100](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9eaf1003e7ab4fb4d75e0be49c67df00c6117210))
10
+ * update variant one and its style to match il and nsa ([b605272](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b605272235cfe5aacbcbfd133b853873f4179c87))
11
+
12
+
13
+ * Merge branch 'tm-2062-change-toplist-logo' into 'master' ([fee0d3e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fee0d3e2962b5e834e3ec1468dd7e59c233b52a4))
14
+ * Merge branch 'tm-2894-popup-design' into 'master' ([aa0d98c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/aa0d98c173162ad6c16893de006ea2770c3873b2))
15
+ * Merge branch 'tm-2907-anchor' into 'master' ([720818e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/720818eec7ab3754550f881b3e0f7b6c23c9fcab))
16
+
1
17
  ## [7.1.14](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.13...v7.1.14) (2022-05-26)
2
18
 
3
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "7.1.14",
3
+ "version": "7.1.15",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -28,13 +28,14 @@ export default function Row({
28
28
  layout = 'list',
29
29
  number = 1,
30
30
  isPPC = false,
31
+ showLaunchDate = true,
31
32
  }) {
32
33
  const itemName = item.name;
33
34
  const itemRating = item.rating;
34
35
  const reviewPath = item.review_link ? `/${item.review_link}` : item.path || '/';
35
- const logoUrl = item.logo_url;
36
36
  const pros = item.extra_fields?.pro_1 || item.extra_fields?.pro_2 || item.extra_fields?.pro_3;
37
37
  const { translations } = useContext(Context) || {};
38
+ const tandcEnabled = item?.extra_fields?.terms_and_conditions_text_enabled === '1';
38
39
  let sellingPoints = item.selling_points;
39
40
  if (pros) {
40
41
  sellingPoints = [
@@ -45,18 +46,24 @@ export default function Row({
45
46
  }
46
47
  const trackerType = tracker.toLowerCase().replace(' ', '_');
47
48
  const prettyLink = prettyTracker(item, trackerType);
49
+ const hasRibbon = getExtraField(item.extra_fields, 'ribbon_text');
50
+ const imageObject = item?.standardised_logo_url_object || item?.logo_url_object;
51
+
48
52
  const launchDate = getLaunchDate(item.founded);
49
- const logUrlObject = item?.logo_url_object;
50
53
 
51
54
  return (
52
- <div className={`${styles.row} ${layout === 'grid' ? styles.grid : ''}`}>
55
+ <div
56
+ className={`${styles.row} ${layout === 'grid' ? styles.grid : ''} ${
57
+ showLaunchDate ? styles.launchDate : ''
58
+ } ${!tandcEnabled ? styles.rowNoTandC : ''}`}
59
+ >
53
60
  {layout === 'grid' && (
54
61
  <div className={`${styles.numbers} ${styles[`num_${number}`]}`} id={`num_${number}`}>
55
62
  {number}
56
63
  </div>
57
64
  )}
58
- <div className={styles.ribbon}>
59
- {getExtraField(item.extra_fields, 'ribbon_text') && (
65
+ {hasRibbon && (
66
+ <div className={styles.ribbon}>
60
67
  <Link to={reviewPath} className="toplist-variant-one-gtm">
61
68
  <Label
62
69
  title={getExtraField(item.extra_fields, 'ribbon_text')}
@@ -67,8 +74,8 @@ export default function Row({
67
74
  }
68
75
  />
69
76
  </Link>
70
- )}
71
- </div>
77
+ </div>
78
+ )}
72
79
 
73
80
  <div className={styles.casinoDetails}>
74
81
  <a
@@ -79,10 +86,13 @@ export default function Row({
79
86
  className="toplist-variant-one-gtm logo-cta"
80
87
  >
81
88
  <LazyImage
82
- alt={getAltText(logUrlObject, itemName)}
83
- width={128}
84
- height={40}
85
- src={imagePrettyUrl(logoUrl, 128, 60)}
89
+ alt={getAltText(imageObject, item.name)}
90
+ src={imagePrettyUrl(imageObject?.filename || item?.logo_url, 80).replace(
91
+ 'filters:format(webp)/',
92
+ ''
93
+ )}
94
+ width={80}
95
+ height={800}
86
96
  />
87
97
  </a>
88
98
  <div>
@@ -94,53 +104,53 @@ export default function Row({
94
104
  >
95
105
  {itemName}
96
106
  </a>
97
- <StarRating numOfStars={5} rating={itemRating} />
107
+ <StarRating numOfStars={5} rating={itemRating} showLabel />
108
+ {!isPPC && (
109
+ <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={reviewPath}>
110
+ {`${itemName} ${translate(translations, 'read_review', 'Review')}`}
111
+ </Link>
112
+ )}
98
113
  </div>
99
114
  </div>
100
- <div className={styles.bonus}>
101
- <a
102
- href={prettyLink}
103
- target="_blank"
104
- rel="noreferrer"
105
- className="toplist-variant-one-gtm bonus-cta"
106
- >
107
- <Bonus item={item} tracker={oneliner} />
108
- </a>
109
- {!isPPC && (
110
- <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={reviewPath}>
111
- {`${itemName} ${translate(translations, 'read_review', 'Review')}`}
112
- </Link>
113
- )}
114
- </div>
115
- <div className={styles.pros}>
116
- <SellingPoints icon={<MdCheck />} sellingPoints={sellingPoints} limit={3} />
117
- </div>
118
- <div className={styles.launchDate}>
119
- {launchDate && (
120
- <>
121
- <p>{translate(translations, 'launch_date', 'Launch Date')}</p>
122
- <p>{launchDate}</p>
123
- </>
124
- )}
125
- </div>
126
- <div className={styles.cta}>
127
- <OperatorCta operator={item} tracker={tracker} gtmClass="toplist-operator-cta-gtm" />
128
- {!isPPC && (
129
- <Link className={`${styles.reviewLink} toplist-variant-one-gtm`} to={reviewPath}>
130
- {`${itemName} ${translate(translations, 'read_review', 'Review')}`}
131
- </Link>
132
- )}
133
- </div>
134
- <div className={styles.tandc}>
135
- {item?.extra_fields?.terms_and_conditions_text_enabled === '1' && (
136
- <Tnc onlyMobile={layout === 'list'} operator={item} />
115
+
116
+ <a
117
+ href={prettyLink}
118
+ target="_blank"
119
+ rel="noreferrer"
120
+ className={`toplist-variant-one-gtm bonus-cta ${styles.bonus} ${
121
+ showLaunchDate ? styles.bonusLaunch : ''
122
+ } ${hasRibbon ? styles.withRibbon : ''}`}
123
+ >
124
+ <Bonus item={item} tracker={oneliner} />
125
+ {showLaunchDate && (
126
+ <span>
127
+ {translate(translations, 'launch_date', 'Launch Date')}: {launchDate}
128
+ </span>
137
129
  )}
138
- </div>
130
+ </a>
131
+ <SellingPoints icon={<MdCheck />} sellingPoints={sellingPoints} limit={3} />
132
+
133
+ {showLaunchDate && (
134
+ <div className={styles.launchDate}>
135
+ {launchDate && (
136
+ <>
137
+ <p className={styles.launchDateLabel}>
138
+ {translate(translations, 'launch_date', 'Launch Date')}
139
+ </p>
140
+ <p>{launchDate}</p>
141
+ </>
142
+ )}
143
+ </div>
144
+ )}
145
+ <OperatorCta operator={item} tracker={tracker} gtmClass="toplist-operator-cta-gtm" />
146
+
147
+ {tandcEnabled && <Tnc onlyMobile={layout === 'list'} operator={item} />}
139
148
  </div>
140
149
  );
141
150
  }
142
151
 
143
152
  Row.propTypes = {
153
+ showLaunchDate: PropTypes.bool,
144
154
  tracker: PropTypes.string,
145
155
  oneliner: PropTypes.string,
146
156
  layout: PropTypes.oneOf(['list', 'grid']),
@@ -150,7 +160,6 @@ Row.propTypes = {
150
160
  name: PropTypes.string,
151
161
  logo_url: PropTypes.string,
152
162
  rating: PropTypes.string,
153
- logo_url_object: PropTypes.shape({}),
154
163
  selling_points: PropTypes.arrayOf(PropTypes.string),
155
164
  review_link: PropTypes.string,
156
165
  one_liners: PropTypes.shape({
@@ -166,6 +175,11 @@ Row.propTypes = {
166
175
  pro_2: PropTypes.string,
167
176
  pro_3: PropTypes.string,
168
177
  }),
178
+ // eslint-disable-next-line react/forbid-prop-types
179
+ standardised_logo_url_object: PropTypes.object,
180
+ // eslint-disable-next-line react/forbid-prop-types
181
+ logo_url_object: PropTypes.object,
182
+
169
183
  bonus: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
170
184
  relation: PropTypes.shape({
171
185
  rating: PropTypes.string,
@@ -1,29 +1,42 @@
1
1
  .row {
2
- background: var(--color-9);
2
+ background: #f3f2f2;
3
3
  border-radius: var(--border-radius);
4
4
  position: relative;
5
5
  text-align: center;
6
- padding: 1rem 3rem;
6
+ justify-content: center;
7
+ align-items: center;
8
+ padding: 3.8rem 2.4rem 3.2rem 2.4rem;
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 1.7rem;
7
12
 
8
13
  @include min(tablet) {
9
14
  display: grid;
10
- grid-template-columns: 1fr 1fr 1fr 1fr;
15
+ grid-template-columns: 1.5fr 1.5fr 1fr;
11
16
  column-gap: 1rem;
12
- padding: 0 0 0 2.4rem;
17
+ padding: 0 0 0 2rem;
13
18
  text-align: inherit;
19
+ row-gap: 1.6rem;
14
20
  }
15
21
 
16
22
  @include min(laptop) {
17
- grid-template-columns: 1fr 1.5fr 1.5fr 1fr 1fr;
18
- padding: 1rem 0 0 2rem;
23
+ grid-template-columns: 2.5fr 2fr 2fr 0.5fr;
24
+ padding: 1.8rem 0 0 2rem;
19
25
  }
20
26
 
21
- &:hover {
22
- background: #ffffff;
23
- box-shadow: 0 0 1.4rem 0.3rem #f0f0f0;
27
+ &.launchDate {
28
+ @include min(tablet) {
29
+ grid-template-columns: 1fr 1fr 1fr;
30
+ }
24
31
 
25
- .tandc {
26
- background: #ffffff;
32
+ @include min(laptop) {
33
+ grid-template-columns: 2.5fr 2fr 2fr 0.8fr 0.5fr;
34
+ }
35
+ }
36
+
37
+ .launchDateLabel {
38
+ @include min(tablet) {
39
+ display: none;
27
40
  }
28
41
  }
29
42
 
@@ -33,14 +46,16 @@
33
46
  top: 0.2rem;
34
47
 
35
48
  span {
36
- padding: 0.5rem 1rem;
37
- font-size: 1.4rem;
38
- color: black;
49
+ padding: 0.8rem 1rem;
50
+ font-size: 1rem;
51
+ color: #08202e;
39
52
  font-weight: 700;
40
53
  text-transform: uppercase;
54
+ background-color: #ffc740 !important;
41
55
  border-radius: var(--border-radius) 0;
42
56
 
43
57
  @include min(tablet) {
58
+ padding: 0.5rem 1rem;
44
59
  font-size: 1rem;
45
60
  }
46
61
  }
@@ -57,179 +72,196 @@
57
72
  }
58
73
 
59
74
  .casinoDetails {
60
- padding-left: 0;
75
+ width: 100%;
76
+ @include flex-align(center, flex-start);
77
+ flex-direction: row;
78
+ gap: 1.6rem;
61
79
 
62
80
  @include min(tablet) {
63
- padding-left: 1rem;
64
- @include flex-align(flex-start, space-between);
65
- flex-direction: column;
81
+ padding-left: 1.6rem;
82
+ width: auto;
83
+ order: 2;
66
84
  }
67
85
 
68
- img {
69
- margin-top: 3rem;
70
- width: auto;
71
- height: 4rem;
86
+ @include min(desktop) {
87
+ padding-left: 2.4rem;
88
+ order: 1;
89
+ }
72
90
 
73
- @include min(tablet) {
74
- margin-top: 1rem;
75
- }
91
+ > a {
92
+ display: flex;
93
+ flex: 0 0 8rem;
94
+ }
95
+
96
+ img {
97
+ width: 8rem;
98
+ height: 8rem;
99
+ border-radius: 0.8rem;
76
100
  }
77
101
 
78
102
  > div {
79
- @include flex-align(center, space-between);
103
+ @include flex-align(flex-start, space-between);
104
+ flex-direction: column;
105
+ gap: 0.8rem;
80
106
 
81
- @include min(tablet) {
82
- width: 100%;
107
+ a:first-child {
108
+ @include link-color(#5a4e51);
109
+ font-weight: 700;
110
+ font-size: 14px;
111
+ line-height: 22px;
83
112
  }
84
113
 
85
- @include max(mobile) {
86
- width: 80%;
87
- margin: 0 auto;
114
+ > div {
115
+ border: 0;
88
116
  }
89
117
 
90
- a {
91
- @include link-color(#5a4e51);
92
- font-size: 1.4rem;
93
- font-weight: 400;
118
+ a:last-child {
119
+ font-weight: 700;
120
+ font-size: 13px;
121
+ line-height: 16px;
122
+ }
123
+ }
124
+ }
94
125
 
95
- @include min(tablet) {
96
- font-size: 1.1rem;
97
- }
126
+ > a.bonus {
127
+ @include flex-direction(column);
128
+ gap: 0.8rem;
129
+ padding-top: 0;
130
+
131
+ p {
132
+ padding: 0;
133
+ }
134
+
135
+ span {
136
+ font-weight: 700;
137
+ font-size: 16px;
138
+ line-height: 23px;
139
+ color: #150e06;
140
+ display: none;
141
+
142
+ @include min(tablet) {
143
+ display: block;
98
144
  }
99
145
 
100
- > div {
101
- font-size: 1.6rem;
146
+ @include min(laptop) {
147
+ display: none;
102
148
  }
103
149
  }
104
- }
105
150
 
106
- .bonus {
107
- @include flex-direction(column);
151
+ &.withRibbon {
152
+ @include min(tablet) {
153
+ padding-top: 2rem !important;
154
+ }
155
+
156
+ @include min(desktop) {
157
+ padding-top: 0 !important;
158
+ }
159
+ }
108
160
 
109
161
  @include min(tablet) {
110
- grid-column: 1/6;
111
- order: -1;
162
+ grid-column: 1/4;
163
+ order: 1;
112
164
  flex-direction: row;
113
165
  justify-content: center;
166
+ align-items: center;
114
167
  background-color: var(--color-7);
115
- padding: 0.3rem 0;
116
- border-top-right-radius: 0.6rem;
117
168
 
118
- > * {
119
- padding-right: 1rem;
169
+ &.bonusLaunch {
170
+ justify-content: space-between;
171
+ padding: 0 1rem;
120
172
  }
121
173
  }
122
174
 
123
175
  @include min(laptop) {
124
176
  background-color: transparent;
125
- order: inherit;
177
+ order: 2;
126
178
  grid-column: auto;
127
179
  flex-direction: column;
180
+ align-items: flex-start;
181
+ padding-top: 0;
128
182
  }
183
+ }
129
184
 
130
- a > div {
131
- @include min(tablet) {
132
- @include flex-direction(row);
133
- > div {
134
- @include flex-align(center, center);
135
- }
136
- }
137
-
138
- @include min(laptop) {
139
- @include flex-direction(column);
140
- > div {
141
- @include flex-align(center, flex-start);
142
- }
143
- }
144
-
145
- div:first-child {
146
- font-size: 2rem;
147
- font-weight: 700;
148
- color: var(--primary-color);
149
- padding-right: 1rem;
150
-
151
- @include min(tablet) {
152
- font-size: 1.6rem;
153
- }
154
- }
155
-
156
- div:nth-child(2) {
157
- font-size: 1.6rem;
158
- color: var(--color-22);
159
- font-weight: 700;
160
- padding: 0.5rem 0;
161
-
162
- @include min(tablet) {
163
- font-size: 1.3rem;
164
- }
165
- }
185
+ ul {
186
+ @include min(tablet) {
187
+ order: 3;
188
+ padding-left: 3rem;
166
189
  }
167
190
 
168
- a.reviewLink {
169
- font-size: 1.3rem;
170
- display: none;
191
+ @include min(desktop) {
192
+ order: 3;
193
+ }
171
194
 
172
- @include min(tablet) {
173
- display: block;
174
- @include flex-align(center, center);
175
- }
195
+ li {
196
+ color: #150e06;
197
+ text-align: left;
176
198
 
177
- @include min(laptop) {
178
- margin-top: auto;
179
- @include flex-align(center, flex-start);
199
+ &::before {
200
+ top: 0.5rem;
180
201
  }
181
202
  }
182
203
  }
183
204
 
184
- .pros, .launchDate {
185
- @include flex-align(center, flex-start);
186
- margin: 1.5rem 0;
205
+ > ul,
206
+ .launchDate {
207
+ @include flex-align(center, center);
187
208
  }
188
209
 
189
210
  .launchDate {
190
- flex-direction: column;
191
- font-size: 1.4rem;
211
+ flex-direction: row;
212
+ gap: 1rem;
213
+ font-size: 2rem;
192
214
  font-weight: 700;
215
+ color: #150e06;
216
+ justify-content: center;
217
+
218
+ @include min(tablet) {
219
+ display: none;
220
+ }
221
+
222
+ @include min(desktop) {
223
+ display: flex;
224
+ order: 4;
225
+ }
193
226
  }
194
227
 
195
- .cta {
228
+ > a:not(.bonus) {
196
229
  @include flex-align(center, center);
197
- @include flex-direction(column);
198
- a:first-child {
199
- width: 90%;
230
+ width: 100%;
231
+ word-break: inherit;
200
232
 
201
- @include min(tablet) {
202
- width: auto;
203
- }
233
+ @include min(tablet) {
234
+ margin-right: 2.4rem;
235
+ order: 4;
236
+ width: auto;
204
237
  }
205
238
 
206
- a:nth-child(2) {
207
- padding-top: 1.5rem;
208
- @include min(tablet) {
209
- display: none;
210
- }
239
+ @include min(desktop) {
240
+ order: 4;
211
241
  }
212
242
  }
213
243
 
214
- .tandc {
215
- grid-column: 1/6;
244
+ > div:last-child {
216
245
  border-radius: 0 0 var(--border-radius) 0;
217
246
  color: var(--color-34);
218
247
  font-size: 0.8rem;
219
248
  padding: 0.6rem 1rem;
220
249
  text-align: center;
221
250
 
222
- button {
223
- font-size: 1.2rem;
224
- }
225
-
226
251
  p {
227
252
  @include max(tablet) {
228
253
  margin-top: 1rem;
229
254
  }
230
255
  }
231
256
 
232
- @include min(laptop) {
257
+ @include min(tablet) {
258
+ order: 5;
259
+ grid-column: 1/4;
260
+ }
261
+
262
+ @include min(desktop) {
263
+ grid-column: 1/6;
264
+ order: 5;
233
265
  background: var(--color-7);
234
266
  }
235
267
  }
@@ -327,3 +359,7 @@
327
359
  }
328
360
  }
329
361
  }
362
+
363
+ .rowNoTandC {
364
+ padding-bottom: 1.8rem;
365
+ }
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/forbid-prop-types */
2
+ /* eslint-disable import/no-extraneous-dependencies */
1
3
  /* eslint-disable no-unused-expressions */
2
4
  /* eslint-disable react/button-has-type */
3
5
  /* eslint-disable react-hooks/exhaustive-deps */
@@ -27,11 +29,17 @@ const Popup = ({ module, isStorybook = false, toggle = false, icon = null, numbe
27
29
  const { translations } = useContext(Context) || {};
28
30
  const date = new Date();
29
31
  const month = months[date.getMonth()];
30
- const title = translate(translations, 'popupTitle', 'Claim These Exclusive Bonuses').replace(
32
+ const title = translate(translations, 'popup_title', 'Claim These Exclusive Bonuses').replace(
31
33
  'month',
32
34
  month
33
35
  );
34
36
 
37
+ const toggleTitle = translate(
38
+ translations,
39
+ 'popup_toggle_title',
40
+ 'Claim These Exclusive Bonuses'
41
+ ).replace('month', month);
42
+
35
43
  const handelActive = (status) => {
36
44
  setShowModal(status);
37
45
  };
@@ -129,7 +137,7 @@ const Popup = ({ module, isStorybook = false, toggle = false, icon = null, numbe
129
137
  }}
130
138
  >
131
139
  {icon}
132
- <p>{title}</p>
140
+ <p>{toggleTitle}</p>
133
141
  </div>
134
142
  )}
135
143
  </div>
@@ -6,6 +6,7 @@ import loadable from '@loadable/component';
6
6
  import { anchorLink } from 'gatsby-core-theme/src/helpers/strings';
7
7
  import { prettyTracker, getSectionExtraField } from 'gatsby-core-theme/src/helpers/getters';
8
8
  import ModuleTitle from 'gatsby-core-theme/src/components/atoms/module-title';
9
+ import { removeSymbols } from '../../../../helpers/strings';
9
10
 
10
11
  import styles from './module.module.scss';
11
12
 
@@ -113,7 +114,7 @@ const Modules = ({ module, page, pageContext }) => {
113
114
  return (
114
115
  ModuleComponent && (
115
116
  <div
116
- id={module.anchor_label && `${anchorLink(module.anchor_label)}`}
117
+ id={module.anchor_label && `${removeSymbols(anchorLink(module.anchor_label))}`}
117
118
  style={module.background_color && moduleBackgroundColor}
118
119
  className={`${styles[moduleClassName] !== undefined ? styles[moduleClassName] : ''} ${
119
120
  module.name
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import keygen from '~helpers/keygen';
4
4
  import { anchorLink } from '~helpers/strings';
5
+ import { removeSymbols } from '../../../../helpers/strings';
5
6
  import styles from './anchor.module.scss';
6
7
 
7
8
  function Anchor({ module: { items }, headerOffset = 80, isFixed = false, icon = null }) {
@@ -20,14 +21,7 @@ function Anchor({ module: { items }, headerOffset = 80, isFixed = false, icon =
20
21
 
21
22
  const handleClick = (event) => {
22
23
  event.preventDefault();
23
- const scrollToElementId =
24
- process.env.GATSBY_SITE_NAME === 'irishluck.ie'
25
- ? event.currentTarget
26
- .getAttribute('href')
27
- .replace(/ /g, '-')
28
- .replace(/[!?@£#$%^&*():;"'|/.,~`]/g, '')
29
- .toLowerCase()
30
- : event.currentTarget.getAttribute('href').replace('#', '');
24
+ const scrollToElementId = event.currentTarget.getAttribute('href').replace('#', '');
31
25
 
32
26
  const targetEl = document.getElementById(scrollToElementId);
33
27
 
@@ -48,7 +42,9 @@ function Anchor({ module: { items }, headerOffset = 80, isFixed = false, icon =
48
42
  className={`${styles.link} anchor-carousel-gtm anchor-menu-gtm`}
49
43
  key={keygen()}
50
44
  onClick={handleClick}
51
- href={`#${anchor.label && anchorLink(anchor?.label?.toLowerCase().trim())}`}
45
+ href={`#${
46
+ anchor.label && removeSymbols(anchorLink(anchor?.label?.toLowerCase().trim()))
47
+ }`}
52
48
  >
53
49
  {anchor.label}
54
50
  {icon}