Skip to content

Commit aa3112b

Browse files
committed
item should not have required props since there is a loading component
1 parent 74774fd commit aa3112b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/compounds/Item/Item.jsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ Item.propTypes = {
9090
isLoading: PropTypes.bool,
9191
item: PropTypes.shape({
9292
description: PropTypes.string,
93-
id: PropTypes.number.isRequired,
93+
id: PropTypes.number,
9494
img: PropTypes.shape({
95-
src: PropTypes.string.isRequired,
95+
src: PropTypes.string,
9696
alt: PropTypes.string,
97-
}).isRequired,
98-
name: PropTypes.string.isRequired,
97+
}),
98+
name: PropTypes.string,
9999
slug: PropTypes.string,
100100
}),
101101
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
@@ -115,6 +115,13 @@ Item.defaultProps = {
115115
isLoading: false,
116116
item: {
117117
description: '',
118+
id: null,
119+
img: {
120+
src: '',
121+
alt: '',
122+
},
123+
name: '',
124+
slug: '',
118125
},
119126
orientation: 'vertical',
120127
titleLink: '',

0 commit comments

Comments
 (0)