Skip to content

Commit 89768f2

Browse files
Merge pull request #292 from bitlogic/dev
Release 27-09-2024
2 parents 5fcb5fb + 93453bc commit 89768f2

File tree

17 files changed

+129
-172
lines changed

17 files changed

+129
-172
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
import React from 'react'
2-
import './BlogGrid.scss'
3-
import Pagination from '../../Pagination/Pagination'
4-
import PropTypes from 'prop-types'
1+
import React from "react"
2+
import "./BlogGrid.scss"
3+
import Pagination from "../../Pagination/Pagination"
4+
import PropTypes from "prop-types"
55

66
const BlogGrid = ({ title, children }) => {
77
return (
88
<div className="grid__container">
99
<h4>{title}</h4>
10-
{/* <div className="grid__content">{children}</div> */}
1110
<Pagination initialState={true} postPerPage="9" posts={children} />
1211
</div>
1312
)
1413
}
1514

1615
BlogGrid.propTypes = {
1716
title: PropTypes.string.isRequired,
18-
children: PropTypes.object.isRequired
17+
children: PropTypes.array.isRequired,
1918
}
2019

21-
export default BlogGrid
20+
export default BlogGrid

src/components/CustomImage/CustomImage.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ const CustomImage = memo(({ image, className, alt, width, height }) => {
66
if (!image) return null
77

88
const { url, localFile } = image
9+
const localImage = getImage(localFile)
910

10-
if (localFile) {
11-
const localImage = getImage(localFile)
12-
11+
if (localImage) {
1312
return (
1413
<GatsbyImage
1514
loading="lazy"

src/components/DualSection/DualSection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ DualSection.propTypes = {
6565
summary: PropTypes.string,
6666
dualSectionPart: PropTypes.arrayOf(
6767
PropTypes.shape({
68-
id: PropTypes.number.isRequired,
68+
id: PropTypes.string.isRequired,
6969
title: PropTypes.string.isRequired,
7070
description: PropTypes.string,
7171
button: PropTypes.shape({

src/components/FaIcon/FaIcon.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
33
import "../FontAwesomeOne/FontAwesomeOne"
4-
import PropTypes from 'prop-types'
4+
import PropTypes from "prop-types"
55

66
const FaIcon = ({ type, code }) => {
77
return (
@@ -11,9 +11,9 @@ const FaIcon = ({ type, code }) => {
1111
)
1212
}
1313

14-
FaIcon.protoType = {
14+
FaIcon.propTypes = {
1515
type: PropTypes.string.isRequired,
16-
code: PropTypes.string.isRequired
16+
code: PropTypes.string.isRequired,
1717
}
1818

19-
export default FaIcon
19+
export default FaIcon

src/components/ListItems/ListItems.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ListItems.propTypes = {
6060
title: PropTypes.string,
6161
ListItem: PropTypes.arrayOf(
6262
PropTypes.shape({
63-
id: PropTypes.number.isRequired,
63+
id: PropTypes.string.isRequired,
6464
title: PropTypes.string.isRequired,
6565
description: PropTypes.string,
6666
landing_page: PropTypes.shape({

src/components/LogosSection/logosSection.js

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,26 @@
11
import "./logosSection.scss"
22
import React from "react"
33
import { useTheme } from "../../context/themeContext"
4-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
54
import Carousel from "react-multi-carousel"
65
import "react-multi-carousel/lib/styles.css"
76
import PropTypes from "prop-types"
87
import CustomImage from "../CustomImage/CustomImage"
98

10-
const handleKeyDown = (event, onClick) => {
11-
if (event.key === "Enter" || event.key === " ") {
12-
onClick()
13-
}
14-
}
15-
169
const CustomLeftArrow = ({ onClick }) => {
1710
return (
18-
<FontAwesomeIcon
19-
role="button"
20-
aria-label="Flecha izquierda para ver logo anterior"
21-
tabIndex={0}
22-
aria-hidden={false}
23-
focusable
24-
onKeyDown={event => handleKeyDown(event, onClick)}
11+
<button
2512
className="react-multiple-carousel__arrow react-multiple-carousel__arrow--left custom-arrow left"
26-
icon="fa-solid fa-chevron-left"
13+
aria-label="Flecha izquierda para ver logo anterior"
2714
onClick={() => onClick()}
2815
/>
2916
)
3017
}
3118

3219
const CustomRightArrow = ({ onClick }) => {
3320
return (
34-
<FontAwesomeIcon
35-
role="button"
36-
aria-label="Flecha derecha para ver el siguiente logo"
37-
tabIndex={0}
38-
aria-hidden={false}
39-
focusable
40-
onKeyDown={event => handleKeyDown(event, onClick)}
21+
<button
4122
className="react-multiple-carousel__arrow react-multiple-carousel__arrow--right custom-arrow right"
42-
icon="fa-solid fa-chevron-right"
23+
aria-label="Flecha derecha para ver el siguiente logo"
4324
onClick={() => onClick()}
4425
/>
4526
)
@@ -123,7 +104,7 @@ LogosSection.propTypes = {
123104
summary: PropTypes.string,
124105
media: PropTypes.arrayOf(
125106
PropTypes.shape({
126-
id: PropTypes.number.isRequired,
107+
id: PropTypes.string.isRequired,
127108
name: PropTypes.string.isRequired,
128109
img: PropTypes.shape({
129110
url: PropTypes.string.isRequired,

src/components/NavBar/AnimatedNavBar/AnimatedNavbar.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useLandingUrl } from "../../../hooks"
88
import PropTypes from "prop-types"
99

1010
function getDropdown(navItem) {
11-
return () => (
11+
return () =>
1212
navItem?.dropdown ? (
1313
<Dropdown
1414
sections={navItem?.dropdownItems}
@@ -17,7 +17,6 @@ function getDropdown(navItem) {
1717
) : (
1818
<Dropdown sections={null} topLevel={null} />
1919
)
20-
);
2120
}
2221

2322
const AnimatedNavbar = ({ navbarItems = [], duration }) => {
@@ -116,7 +115,7 @@ const AnimatedNavbar = ({ navbarItems = [], duration }) => {
116115
onMouseEnter={() => onMouseEnter(index)}
117116
isDropdown={n?.isDropdown}
118117
>
119-
{currentIndex === index && (
118+
{currentIndex === index ? (
120119
<DropdownContainer
121120
direction={direction}
122121
animatingOut={animationOut}
@@ -125,7 +124,7 @@ const AnimatedNavbar = ({ navbarItems = [], duration }) => {
125124
<CurrentDropdown />
126125
{PrevDropdown && <PrevDropdown />}
127126
</DropdownContainer>
128-
)}
127+
) : null}
129128
</NavbarItem>
130129
)
131130
})}

src/components/NavBar/AnimatedNavBar/DropdownContainer/Dropdown.js

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RenderSection.propTypes = {
3737
slug: PropTypes.string.isRequired,
3838
}),
3939
icon: PropTypes.shape({
40-
url: PropTypes.string.isRequired,
40+
url: PropTypes.string,
4141
alternativeText: PropTypes.string,
4242
localFile: PropTypes.shape({
4343
childImageSharp: PropTypes.shape({
@@ -83,40 +83,10 @@ const Dropdown = memo(({ sections, topLevel }) => {
8383
})
8484

8585
Dropdown.propTypes = {
86-
topLevel: PropTypes.shape({
87-
label: PropTypes.string.isRequired,
88-
text: PropTypes.string,
89-
url: PropTypes.string,
90-
landing_page: PropTypes.shape({
91-
slug: PropTypes.string.isRequired,
92-
}),
93-
icon: PropTypes.shape({
94-
url: PropTypes.string.isRequired,
95-
alternativeText: PropTypes.string,
96-
localFile: PropTypes.shape({
97-
childImageSharp: PropTypes.shape({
98-
gatsbyImageData: PropTypes.object.isRequired,
99-
}),
100-
}),
101-
}),
102-
}),
86+
topLevel: PropTypes.object,
10387
sections: PropTypes.arrayOf(
10488
PropTypes.shape({
105-
label: PropTypes.string.isRequired,
106-
text: PropTypes.string,
107-
url: PropTypes.string,
108-
landing_page: PropTypes.shape({
109-
slug: PropTypes.string.isRequired,
110-
}),
111-
icon: PropTypes.shape({
112-
url: PropTypes.string.isRequired,
113-
alternativeText: PropTypes.string,
114-
localFile: PropTypes.shape({
115-
childImageSharp: PropTypes.shape({
116-
gatsbyImageData: PropTypes.object.isRequired,
117-
}),
118-
}),
119-
}),
89+
id: PropTypes.number.isRequired,
12090
})
12191
),
12292
}

src/components/NavBar/AnimatedNavBar/DropdownContainer/FadeContents.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const FadeContents = forwardRef(
1919
)
2020

2121
const propTypes = {
22-
duration: PropTypes.number,
2322
direction: PropTypes.oneOf(["right", "left"]),
2423
animatingOut: PropTypes.bool,
2524
children: PropTypes.node,

src/components/NavBar/AnimatedNavBar/DropdownContainer/dropdown.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
align-items: center;
2525
font-size: 18px;
2626

27-
2827
&-inner {
28+
text-align: start;
2929
color: $primary;
3030
padding: 8px 0;
3131
font-weight: $standard;
3232

3333
&:hover {
34-
text-decoration: underline solid $primary
34+
text-decoration: underline solid $primary;
3535
}
3636
}
3737

@@ -58,8 +58,10 @@
5858
}
5959

6060
.navbarItemIcon {
61-
width: 28px !important;
62-
height: 28px !important;
61+
width: 100%;
62+
height: 100%;
63+
max-width: 28px;
64+
max-height: 28px;
6365
align-self: center;
6466
margin-right: 5px;
6567

@@ -109,7 +111,6 @@
109111
padding-left: 50px;
110112
}
111113

112-
113114
&-background {
114115
filter: brightness(120%);
115116
transform-origin: 0 0;
@@ -171,4 +172,4 @@
171172
transform: rotateX(-15deg);
172173
opacity: 0;
173174
}
174-
}
175+
}

0 commit comments

Comments
 (0)