gatsby-core-theme 44.4.52 → 44.5.0-poc.2

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.
Files changed (33) hide show
  1. package/.ci.yml +26 -0
  2. package/CHANGELOG.md +30 -126
  3. package/gatsby-browser.js +100 -48
  4. package/gatsby-node.mjs +21 -25
  5. package/package.json +1 -1
  6. package/release.config.js +5 -0
  7. package/src/components/atoms/author/index.js +5 -6
  8. package/src/components/atoms/collapse/collapse.test.js +26 -113
  9. package/src/components/atoms/collapse/index.js +1 -23
  10. package/src/components/molecules/comment/comment.module.scss +57 -7
  11. package/src/components/molecules/comment/index.js +79 -5
  12. package/src/components/molecules/header/variants/operator/template-one-two/index.js +3 -4
  13. package/src/components/molecules/header/variants/operator/template-one-two/template-one-two.stories.js +3 -4
  14. package/src/components/molecules/header/variants/slot/template-one/index.js +3 -4
  15. package/src/components/molecules/header/variants/slot/template-one/template-one.stories.js +3 -4
  16. package/src/components/molecules/leave-comment-form/index.js +0 -1
  17. package/src/components/organisms/anchor/template-one/anchor.module.scss +11 -19
  18. package/src/components/organisms/archive/index.js +2 -5
  19. package/src/components/organisms/comments/comment-tree/index.js +7 -8
  20. package/src/components/organisms/comments/index.js +24 -13
  21. package/src/components/organisms/cookie-consent/index.js +34 -48
  22. package/src/components/organisms/form/fields/fields.module.scss +2 -5
  23. package/src/components/organisms/form/fields/index.js +4 -2
  24. package/src/components/organisms/form/form.module.scss +39 -76
  25. package/src/components/organisms/form/index.js +1 -0
  26. package/src/constants/forms.js +1 -1
  27. package/src/helpers/tracker.mjs +2 -2
  28. package/src/resolver/redirect.mjs +0 -23
  29. package/src/resolver/redirect.test.js +1 -65
  30. package/src/components/atoms/comment-votes/comment-votes.module.scss +0 -34
  31. package/src/components/atoms/comment-votes/index.js +0 -92
  32. package/src/components/organisms/comments/comment-tree/comment-tree.module.scss +0 -47
  33. package/src/context/VotesProvider.js +0 -49
@@ -1,137 +1,50 @@
1
1
  /* eslint-disable no-underscore-dangle */
2
+
2
3
  import React from 'react';
3
- import { render, cleanup, fireEvent, waitFor } from '@testing-library/react';
4
+ import { render, cleanup, fireEvent } from '@testing-library/react';
4
5
  import '@testing-library/jest-dom/extend-expect';
5
6
  import Collapse from '.';
6
7
 
7
8
  describe('Collapse Component', () => {
8
- afterEach(() => {
9
- cleanup();
10
- jest.restoreAllMocks();
11
- delete HTMLElement.prototype.scrollHeight;
12
- });
13
-
14
- const setup = (props = {}) =>
15
- render(
16
- <Collapse
17
- buttonText="Toggle"
18
- contentText="Test Content"
19
- {...props}
20
- />
21
- );
22
-
23
- test('renders with button and string content', () => {
24
- const { getByText } = setup();
25
- expect(getByText('Toggle')).toBeInTheDocument();
26
- expect(getByText('Test Content')).toBeInTheDocument();
27
- });
28
-
29
- test('renders with React element as contentText', () => {
30
- const { getByText } = render(
31
- <Collapse
32
- buttonText="Toggle"
33
- contentText={<p>JSX Content</p>}
34
- />
35
- );
36
- expect(getByText('JSX Content')).toBeInTheDocument();
37
- });
38
-
39
- test('opens when initOpen is true', async () => {
40
- const scrollHeightMock = 200;
41
- Object.defineProperty(HTMLElement.prototype, 'scrollHeight', {
42
- configurable: true,
43
- get: () => scrollHeightMock,
44
- });
45
-
9
+ test('Render', () => {
46
10
  const { container } = render(
47
- <Collapse
48
- buttonText="Toggle"
49
- contentText="Test Content"
50
- initOpen
51
- onlyMobile
52
- />
11
+ <Collapse buttonText="Open" contentText="Content Text" initOpen />
53
12
  );
54
13
 
55
- const contentDiv = container.querySelector('div[style]');
56
- expect(contentDiv).toBeInTheDocument();
14
+ const button = container.querySelector('button');
15
+ const content = container.querySelector('div.content');
57
16
 
58
- await waitFor(() => {
59
- expect(contentDiv.style.maxHeight).toBe(`${scrollHeightMock}px`);
60
- });
17
+ expect(button.innerHTML).toBe('Open');
18
+ expect(content.innerHTML).toBe('Content Text');
61
19
  });
62
20
 
63
- test('toggles open/close on click', () => {
64
- const scrollHeightMock = 300;
65
-
66
- Object.defineProperty(HTMLElement.prototype, 'scrollHeight', {
67
- configurable: true,
68
- get: () => scrollHeightMock,
69
- });
70
-
71
- const { container, getByText } = setup({ onlyMobile: true });
72
-
73
- const contentDiv = container.querySelector('div[style]');
74
- expect(contentDiv).not.toBeNull();
75
-
76
- const button = getByText('Toggle');
21
+ test('Open collapse', () => {
22
+ const { container } = render(<Collapse buttonText="Open" contentText="Content Text" />);
77
23
 
24
+ const button = container.querySelector('button');
25
+ expect(button.classList.contains('active')).toBeFalsy();
78
26
  fireEvent.click(button);
79
- expect(contentDiv.style.maxHeight).toBe(`${scrollHeightMock}px`);
80
-
81
- fireEvent.click(button);
82
- expect(['0', '0px']).toContain(contentDiv.style.maxHeight);
83
- });
84
-
85
- test('renders correctly with onlyMobile and onlyDesktop props', () => {
86
- const { getByText } = setup({ onlyMobile: true });
87
- expect(getByText('Toggle')).toBeInTheDocument();
88
-
89
- cleanup();
90
-
91
- const { getByText: getByText2 } = setup({ onlyDesktop: true });
92
- expect(getByText2('Toggle')).toBeInTheDocument();
27
+ // jest does not render the component, hence testing the actual layout cannot be done due to the collapse using scrollHeight.
93
28
  });
94
29
 
95
- test('closes on outside click when closeOnOutsideClick is true', async () => {
96
- const scrollHeightMock = 100;
97
-
98
- Object.defineProperty(HTMLElement.prototype, 'scrollHeight', {
99
- configurable: true,
100
- get: () => scrollHeightMock,
101
- });
102
-
30
+ test('Open collapse with different initial height', () => {
103
31
  const { container } = render(
104
- <div>
105
- <Collapse
106
- buttonText="Toggle"
107
- contentText="Test Content"
108
- initOpen
109
- closeOnOutsideClick
110
- onlyMobile
111
- />
112
- <div data-testid="outside">Outside</div>
113
- </div>
32
+ <Collapse buttonText="Open" maxHeight={20} contentText="Content Text" />
114
33
  );
115
34
 
116
- const contentDiv = container.querySelector('div[style]');
117
- expect(contentDiv).not.toBeNull();
118
- expect(contentDiv.style.maxHeight).toBe(`${scrollHeightMock}px`);
119
-
120
- const outside = container.querySelector('[data-testid="outside"]');
121
- fireEvent.mouseDown(outside);
122
-
123
- await waitFor(() => {
124
- expect(['0', '0px']).toContain(contentDiv.style.maxHeight);
125
- });
35
+ const button = container.querySelector('button');
36
+ fireEvent.click(button);
37
+ expect(button.classList.contains('active')).toBeFalsy();
126
38
  });
127
39
 
128
- test('does not apply maxHeight when onlyMobile and onlyDesktop are false', () => {
129
- const { container } = setup({ initOpen: true });
130
-
131
- const divs = container.querySelectorAll('div');
132
- const contentDiv = Array.from(divs).find(div =>
133
- div.innerHTML.includes('Test Content')
40
+ test('Only Mobile', () => {
41
+ const { container } = render(
42
+ <Collapse buttonText="Open" contentText="Content Text" onlyMobile />
134
43
  );
135
- expect(contentDiv.style.maxHeight).toBe('');
44
+
45
+ expect(container.querySelector('button')).toBeTruthy();
136
46
  });
137
47
  });
48
+ afterEach(() => {
49
+ cleanup();
50
+ });
@@ -10,11 +10,9 @@ const Collapse = ({
10
10
  onlyDesktop = false,
11
11
  initOpen = false,
12
12
  maxHeight = 0,
13
- closeOnOutsideClick = false,
14
13
  }) => {
15
14
  const [maxHeightStyle, setMaxHeightStyle] = useState(maxHeight);
16
15
  const contentRef = useRef(React.createRef());
17
- const containerRef = useRef(null);
18
16
 
19
17
  useEffect(() => {
20
18
  if (initOpen) {
@@ -22,22 +20,6 @@ const Collapse = ({
22
20
  }
23
21
  }, [initOpen]);
24
22
 
25
-
26
- useEffect(() => {
27
- if (!closeOnOutsideClick || maxHeightStyle === 0) return;
28
-
29
- const handleClickOutside = (event) => {
30
- if (containerRef.current && !containerRef.current.contains(event.target)) {
31
- setMaxHeightStyle(0);
32
- }
33
- };
34
-
35
- document.addEventListener('mousedown', handleClickOutside);
36
- return () => {
37
- document.removeEventListener('mousedown', handleClickOutside);
38
- };
39
- }, [closeOnOutsideClick, maxHeightStyle]);
40
-
41
23
  const clickHandler = () => {
42
24
  if (maxHeightStyle === 0) {
43
25
  setMaxHeightStyle(contentRef.current.scrollHeight);
@@ -47,10 +29,7 @@ const Collapse = ({
47
29
  };
48
30
 
49
31
  return (
50
- <div
51
- ref={containerRef}
52
- className={styles?.collapseContainer || ''}
53
- >
32
+ <div className={styles?.collapseContainer || ''}>
54
33
  <div className={maxHeightStyle !== 0 ? styles?.active || '' : ''}>
55
34
  <button
56
35
  type="button"
@@ -95,7 +74,6 @@ Collapse.propTypes = {
95
74
  onlyDesktop: PropTypes.bool,
96
75
  initOpen: PropTypes.bool,
97
76
  maxHeight: PropTypes.number,
98
- closeOnOutsideClick: PropTypes.bool,
99
77
  };
100
78
 
101
79
  export default Collapse;
@@ -3,17 +3,27 @@
3
3
 
4
4
  gap: 1.6rem;
5
5
  position: relative;
6
- margin-bottom: 3.4rem;
7
6
 
8
- @include min(tablet){
9
- margin-bottom: 0;
7
+ ~ div .commentContainer::before{
8
+ border-left: .1rem solid #cfc7c0;
9
+ top: -13rem;
10
+ content: "";
11
+ height: 22rem;
12
+ position: absolute;
13
+ right: 100%;
14
+ width: 2.9rem;
15
+ z-index: 0;
16
+ }
17
+
18
+ + div .commentContainer::before{
19
+ height: 12rem;
20
+ top: -5rem;
10
21
  }
11
22
  }
12
23
 
13
24
  .commentTopArea{
14
25
  @include flex-align(center, start);
15
26
 
16
- flex-wrap: wrap;
17
27
  gap: .8rem;
18
28
  }
19
29
 
@@ -21,7 +31,6 @@
21
31
  font-size: 18px;
22
32
  font-weight: 600;
23
33
  line-height: 28px;
24
- color: #1B1B1C;
25
34
  }
26
35
 
27
36
  .commentJobTitle{
@@ -35,7 +44,6 @@
35
44
 
36
45
  border-radius: 5rem;
37
46
  background: #CFC7C0;
38
- color: #0F172A;
39
47
  }
40
48
 
41
49
  .commentDate{
@@ -53,12 +61,50 @@
53
61
  padding: 2.4rem;
54
62
  }
55
63
 
64
+ .isReplyThread::before{
65
+ content: "";
66
+ position: absolute;
67
+ right: 100%;
68
+ border-left: .1rem solid #CFC7C0;
69
+ border-bottom: .1rem solid #CFC7C0;
70
+ border-bottom-left-radius: 2rem;
71
+ height: -webkit-fill-available;
72
+ width: 3rem;
73
+ bottom: 50%;
74
+ z-index: 0;
75
+ }
76
+
56
77
  .commentActions{
57
78
  margin-left: auto;
58
79
 
59
80
  @include flex-direction(row);
60
81
  }
61
82
 
83
+ .buttonGroup{
84
+ background: #CFC7C0;
85
+ font-size: 1.2rem;
86
+ padding: .8rem;
87
+ gap: .4rem;
88
+
89
+ @include flex-align(center, center);
90
+
91
+ &.left{
92
+ border-bottom-left-radius: 5rem;
93
+ border-top-left-radius: 5rem;
94
+ padding-right: 0;
95
+ }
96
+
97
+ &.right{
98
+ border-bottom-right-radius: 5rem;
99
+ border-top-right-radius: 5rem;
100
+ }
101
+ }
102
+
103
+ .buttonGroupIcon{
104
+ width: 1.6rem;
105
+ height: 1.6rem;
106
+ }
107
+
62
108
  .replyButton{
63
109
  border-radius: 10rem;
64
110
  border: 1.5px solid #161128;
@@ -67,13 +113,17 @@
67
113
  line-height: 1.8rem;
68
114
  text-transform: capitalize;
69
115
  margin-left: .8rem;
70
- padding: 0.2rem 1.6rem;
116
+ padding: 0.8rem 1.6rem;
71
117
  }
72
118
 
73
119
  .replySection{
74
120
  display: grid;
75
121
  }
76
122
 
123
+ .disabled > *{
124
+ opacity: .3;
125
+ }
126
+
77
127
  .buttonGroup[disabled]{
78
128
  cursor: default;
79
129
  }
@@ -3,12 +3,12 @@
3
3
  /* eslint-disable react-hooks/exhaustive-deps */
4
4
  /* eslint-disable jsx-a11y/click-events-have-key-events */
5
5
  /* eslint-disable import/no-extraneous-dependencies */
6
- import React, { useState } from 'react';
6
+ import React, { useRef, useState } from 'react';
7
+ import axios from 'axios';
7
8
  import PropTypes from 'prop-types';
8
9
  import LazyImage from '~hooks/lazy-image';
9
10
  import LeaveCommentForm from '../leave-comment-form';
10
11
  import useTranslate from '~hooks/useTranslate/useTranslate';
11
- import CommentVotes from '../../atoms/comment-votes';
12
12
  import styles from './comment.module.scss';
13
13
 
14
14
  const Comment = ({
@@ -16,21 +16,67 @@ const Comment = ({
16
16
  comment,
17
17
  authors,
18
18
  isReply,
19
+ userInteractions,
19
20
  showVotes = true
20
21
  }) => {
21
22
  const commentName = comment?.author_id ? authors?.[comment?.author_id]?.name : comment.author_name;
22
23
  const commentJobTitle = comment?.author_id ? authors?.[comment?.author_id]?.author_title : undefined;
23
-
24
24
  const date = new Date(comment.updated_at);
25
25
  const day = String(date.getUTCDate()).padStart(2, '0');
26
26
  const month = String(date.getUTCMonth() + 1).padStart(2, '0');
27
27
  const year = date.getUTCFullYear();
28
+ const [reply, setReply] = useState(false);
29
+ const [likes, setLikes] = useState(comment.votes_up);
30
+ const [dislikes, setDislikes] = useState(comment.votes_down);
31
+ const currentUserInteractions = useRef(userInteractions);
28
32
 
29
33
  const hours = String(date.getUTCHours()).padStart(2, '0');
30
34
  const minutes = String(date.getUTCMinutes()).padStart(2, '0');
31
35
  const commentDate = `${day}/${month}/${year} | ${hours}:${minutes}`;
36
+
37
+ const handleVote = async (like = false, commentId) => {
38
+ const data = like
39
+ ? {
40
+ "vote_up": "increase",
41
+ "commentID": commentId
42
+ }
43
+ : {
44
+ "vote_down": "increase",
45
+ "commentID": commentId
46
+ };
32
47
 
33
- const [reply, setReply] = useState(false);
48
+ const headers = {
49
+ headers: {
50
+ "Content-Type": "application/json",
51
+ Accept: "application/json",
52
+ },
53
+ };
54
+
55
+ const existingCookie = document.cookie
56
+ .split('; ')
57
+ .find((row) => row.startsWith('comments='))
58
+ ?.split('=')[1] || '';
59
+
60
+ const ids = existingCookie.split(',').filter(Boolean);
61
+
62
+ const alreadyVoted = ids.some((entry) => entry.startsWith(`${commentId}:`));
63
+ if (!alreadyVoted) {
64
+ ids.push(`${commentId}: ${like ? 'vote_up' : 'vote_down'}`);
65
+ document.cookie = `comments=${ids.join(',')}; path=/;`;
66
+ currentUserInteractions.current = ids;
67
+ console.log(currentUserInteractions.current);
68
+ }
69
+
70
+ return new Promise((resolve, reject) => {
71
+ axios
72
+ .put('/api/put-vote', data, headers)
73
+ .then((response) => {
74
+ response.ok = response.status === 200;
75
+ resolve(response);
76
+ })
77
+ .catch((error) => reject(error?.response?.data?.errors?.join() || error.message));
78
+ });
79
+ }
34
80
 
35
81
  return <div className={`${styles.commentContainer} ${isReply ? styles.isReply : ''}`}>
36
82
  <div className={styles.commentTopArea}>
@@ -44,7 +90,34 @@ const Comment = ({
44
90
  </div>
45
91
  <div className={styles.commentActions}>
46
92
  {showVotes && (
47
- <CommentVotes comment={comment} />
93
+ <>
94
+ <button
95
+ onClick={async () => {
96
+ await handleVote(true, comment.comment_id)
97
+ setLikes((prev) => prev + 1)
98
+ }}
99
+ aria-label='Like Button'
100
+ type='button'
101
+ className={`${styles.buttonGroup} ${styles.left} ${currentUserInteractions.current?.find(v => v.startsWith(`${comment.comment_id}:`))?.split(': ')[1] === 'vote_down' && styles.disabled || ''}`}
102
+ disabled={currentUserInteractions.current?.find(v => v.startsWith(`${comment.comment_id}:`))}
103
+ >
104
+ <LazyImage className={styles.buttonGroupIcon} src='/images/like.svg' />
105
+ <span>{likes}</span>
106
+ </button>
107
+ <button
108
+ onClick={async () => {
109
+ await handleVote(false, comment.comment_id)
110
+ setDislikes((prev) => prev + 1)
111
+ }}
112
+ aria-label='Dislike Button'
113
+ type='button'
114
+ className={`${styles.buttonGroup} ${styles.right} ${currentUserInteractions.current?.find(v => v.startsWith(`${comment.comment_id}:`))?.split(': ')[1] === 'vote_up' && styles.disabled || ''}`}
115
+ disabled={currentUserInteractions.current?.find(v => v.startsWith(`${comment.comment_id}:`))}
116
+ >
117
+ <LazyImage className={styles.buttonGroupIcon} src='/images/dislike.svg' />
118
+ <span>{dislikes}</span>
119
+ </button>
120
+ </>
48
121
  )}
49
122
  {!isReply && (
50
123
  <button aria-label='Reply Button' onClick={() => setReply(!reply)} type='button' className={styles.replyButton}>
@@ -72,6 +145,7 @@ Comment.propTypes = {
72
145
  }),
73
146
  authors: PropTypes.shape({}),
74
147
  isReply: PropTypes.bool,
148
+ userInteractions: PropTypes.arrayOf(PropTypes.string),
75
149
  showVotes: PropTypes.bool
76
150
  };
77
151
 
@@ -1,4 +1,4 @@
1
- import React, { lazy, Suspense } from 'react';
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  // eslint-disable-next-line import/no-extraneous-dependencies
4
4
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
@@ -7,6 +7,7 @@ import { getAltText } from '~helpers/image';
7
7
  import LazyImage from '~hooks/lazy-image';
8
8
  import StarRating from '~molecules/star-rating/one-star';
9
9
  import useTranslate from '~hooks/useTranslate/useTranslate';
10
+ import Verify from '~images/icons/verify';
10
11
  import Rating from '~atoms/ratings';
11
12
  import OperatorBanner from '~atoms/header-operator-bannner';
12
13
  import VariableComponent from '../variables';
@@ -15,8 +16,6 @@ import { TrackingKeys } from '~constants/tracking-api'
15
16
  import PrettyLink from '~atoms/pretty-link';
16
17
  import Ribbons from '~atoms/ribbons';
17
18
 
18
- const VerifyIcon = lazy(() => import('~images/icons/verify'));
19
-
20
19
  const TemplateOneTwo = ({
21
20
  relation,
22
21
  type,
@@ -71,7 +70,7 @@ const TemplateOneTwo = ({
71
70
  >
72
71
  <div className={styles.name}>
73
72
  <h1>{name}</h1>
74
- {icon || <Suspense fallback={null}><VerifyIcon /></Suspense>}
73
+ {icon || <Verify />}
75
74
  </div>
76
75
  {ribbon && <Ribbons customStyle={template === 'template_two' ? styles.templateTwoRibbon : ''} item={[relation.ribbons[0]]} /> }
77
76
  {!['coming_soon', 'inactive'].includes(relation?.status) ? (
@@ -1,8 +1,7 @@
1
- import React, { lazy } from "react";
1
+ import React from "react";
2
2
  import TemplateOne from ".";
3
3
  import getOperatorData from "../../../../../../../tests/factories/relations/operator.factory";
4
-
5
- const VerifyIcon = lazy(() => import('~images/icons/verify'));
4
+ import Verify from '~images/icons/verify';
6
5
 
7
6
  const pageOperatorData = getOperatorData();
8
7
 
@@ -46,7 +45,7 @@ export default {
46
45
  },
47
46
  icon: {
48
47
  name: "Icon",
49
- defaultValue: <VerifyIcon />,
48
+ defaultValue: <Verify />,
50
49
  },
51
50
  },
52
51
  };
@@ -1,4 +1,4 @@
1
- import React, { lazy, Suspense } from 'react';
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
4
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
@@ -6,15 +6,14 @@ import { imagePrettyUrl } from '~helpers/getters';
6
6
  import OperatorBanner from '~atoms/header-operator-bannner';
7
7
  import Rating from '~atoms/ratings';
8
8
  import { getAltText } from '~helpers/image';
9
+ import Verify from '~images/icons/verify';
9
10
  import { TrackingKeys } from '~constants/tracking-api'
10
11
  import styles from './slot.module.scss';
11
12
 
12
- const VerifyIcon = lazy(() => import('~images/icons/verify'));
13
-
14
13
  export default function SlotHeader({
15
14
  page,
16
15
  moduleName = TrackingKeys?.HEADERSLOTS,
17
- image = <Suspense fallback={null}><VerifyIcon /></Suspense>,
16
+ image = <Verify />,
18
17
  showExtraRatings = false,
19
18
  width = 170,
20
19
  height = 170,
@@ -1,8 +1,7 @@
1
1
  /* eslint-disable react/destructuring-assignment */
2
- import React, { lazy } from 'react';
2
+ import React from 'react';
3
3
  import TemplateOne from '.';
4
-
5
- const VerifyIcon = lazy(() => import('~images/icons/verify'));
4
+ import Verify from '~images/icons/verify';
6
5
 
7
6
  export default {
8
7
  title: 'Theme/Layout/Header/Games/Template One',
@@ -68,6 +67,6 @@ Default.args = {
68
67
  },
69
68
  },
70
69
  },
71
- image: <VerifyIcon />,
70
+ image: <Verify />,
72
71
  headerBonus: true,
73
72
  };
@@ -82,7 +82,6 @@ const LeaveCommentForm = ({
82
82
  validationMessage={validationMessage}
83
83
  path={page?.path}
84
84
  buttonIcon={buttonIcon}
85
- titleType='h3'
86
85
  customClass='commentForm'
87
86
  />
88
87
  };
@@ -1,4 +1,4 @@
1
- @keyframes fade-in {
1
+ @keyframes fadeIn {
2
2
  0% {
3
3
  opacity: 0;
4
4
  }
@@ -24,17 +24,16 @@
24
24
 
25
25
  .defaultConatiner {
26
26
  position: relative;
27
-
28
27
  @include flex-direction(row);
29
28
  }
30
29
 
31
30
  .anchor {
32
31
  max-width: var(--main-container-max);
33
-
34
32
  @include flex-direction(row);
35
33
 
36
34
  &::-webkit-scrollbar {
37
35
  height: 0.4rem;
36
+ // display: none;
38
37
  }
39
38
 
40
39
  &::-webkit-scrollbar-track {
@@ -50,26 +49,23 @@
50
49
 
51
50
  .stickyContainer {
52
51
  position: fixed;
53
- z-index: 2;
54
- animation: fade-in 1s forwards;
52
+ z-index: 1;
53
+ animation: fadeIn 1s forwards;
55
54
  width: 100%;
56
- background-color: #fff;
57
- box-shadow: 0 8px 12px 0;
55
+ background-color: white;
56
+ box-shadow: 0px 8px 12px 0px;
58
57
  left: 0;
59
58
  right: 0;
60
59
  top: var(--nav-height);
61
-
62
60
  @include flex-direction(row);
63
61
  @include flex-align(center, center);
64
-
65
62
  padding-bottom: 0.5rem;
66
-
67
63
  .anchor{
64
+
68
65
  &::-webkit-scrollbar {
69
66
  display: none;
70
67
  }
71
68
  }
72
-
73
69
  &.usingExclOperator {
74
70
  top: calc(var(--nav-height) + var(--exc-operator-height));
75
71
  }
@@ -88,7 +84,6 @@
88
84
  line-height: 27px;
89
85
 
90
86
  @include flex-align(center, center);
91
-
92
87
  margin-right: 1.6rem;
93
88
  margin-bottom: 0.5rem;
94
89
  margin-top: 0.5rem;
@@ -100,7 +95,7 @@
100
95
  @include min(laptop) {
101
96
  &:hover {
102
97
  background-color: #272735;
103
- color: #fff;
98
+ color: #ffffff;
104
99
  }
105
100
  }
106
101
  }
@@ -124,14 +119,11 @@
124
119
  .buttLeft,
125
120
  .buttRight {
126
121
  @include flex-align(center, center);
127
-
128
- background-color: var(--body-background-color, #fff);
129
-
122
+ background-color: var(--body-background-color, white);
130
123
  @include flex-align(center, center);
131
-
132
124
  display: none;
133
125
  z-index: 1;
134
- padding: 0 1rem;
126
+ padding: 0rem 1rem;
135
127
 
136
128
  @include custom-min(960) {
137
129
  display: flex;
@@ -141,7 +133,7 @@
141
133
  width: 3.2rem;
142
134
  height: 3.2rem;
143
135
  padding: 0.8rem;
144
- color: #fff;
136
+ color: #ffffff;
145
137
  background-color: #262629;
146
138
  border-radius: 10rem;
147
139
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-hooks/rules-of-hooks */
2
1
  /* eslint-disable no-nested-ternary */
3
2
  import React, { useState, useEffect } from 'react';
4
3
  import PropTypes from 'prop-types';
@@ -33,9 +32,8 @@ const Archive = ({ module, page, loadMore, gtmClass = '', anchorLabel, modulePos
33
32
  setModuleItems(items);
34
33
  }
35
34
  };
36
-
37
- const loadMoreText = useTranslate(`load_more_${module?.model_type}`) || useTranslate('load_more', 'Load More');
38
-
35
+
36
+ const loadMoreText = useTranslate('load_more', 'Load More');
39
37
  updatedModule.items = moduleItems;
40
38
  return (
41
39
  <>
@@ -75,7 +73,6 @@ Archive.propTypes = {
75
73
  items: PropTypes.arrayOf(PropTypes.object),
76
74
  pagination_type: PropTypes.string,
77
75
  num_of_items: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
78
- model_type: PropTypes.string,
79
76
  }).isRequired,
80
77
  loadMore: PropTypes.shape({
81
78
  label: PropTypes.string,