Skip to content

Commit 5d923a2

Browse files
committed
remove the no longer needed fromItemGroup prop
1 parent 41281a8 commit 5d923a2

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

src/compounds/Item/CardBody.jsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Link from '../../components/Link/Link'
55
import NextLink from '../../components/NextLink/NextLink'
66
import LinkedButton from '../LinkedButton/LinkedButton'
77

8-
const CardBody = ({ buttonLink, buttonProps, fromItemGroup, item,
8+
const CardBody = ({ buttonLink, buttonProps, item,
99
orientation, titleLink, withButtonLink, withTitleLink }) => {
1010
const { id, description, name } = item
1111

@@ -14,16 +14,13 @@ const CardBody = ({ buttonLink, buttonProps, fromItemGroup, item,
1414
<div className={orientation === 'horizontal' ? 'd-block d-md-flex align-items-center justify-content-between' : ''}>
1515
<div className={orientation === 'horizontal' ? 'me-2' : ''}>
1616
<Card.Title>
17-
{(withTitleLink && fromItemGroup) && (
17+
{(withTitleLink) && (
1818
<NextLink
1919
text={name}
2020
path={{ pathname: titleLink, query: { id } }}
2121
addClass='text-decoration-none link-hover'
2222
/>
2323
)}
24-
{(withTitleLink && !fromItemGroup) && (
25-
<Link label={name} addClass='text-decoration-none link-hover' href={titleLink} />
26-
)}
2724
{(!withTitleLink) && (
2825
name
2926
)}
@@ -58,7 +55,6 @@ CardBody.propTypes = {
5855
// buttonProps: props => props.withButtonLink
5956
// ? PropTypes.shape(Button.propTypes)
6057
// : PropTypes.shape({ ...Button.propTypes, label: PropTypes.string })
61-
fromItemGroup: PropTypes.bool,
6258
item: PropTypes.shape({
6359
description: PropTypes.string,
6460
id: PropTypes.number.isRequired,
@@ -78,7 +74,6 @@ CardBody.propTypes = {
7874
CardBody.defaultProps = {
7975
buttonLink: '',
8076
buttonProps: LinkedButton.defaultProps,
81-
fromItemGroup: false,
8277
item: {
8378
description: '',
8479
},

src/compounds/Item/Item.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import LinkedButton from '../LinkedButton/LinkedButton'
77
import ItemLoading from './ItemLoading'
88
import './item.scss'
99

10-
const Item = ({ buttonLink, buttonProps, href, fromItemGroup, isLoading, item, orientation, titleLink, withButtonLink,
10+
const Item = ({ buttonLink, buttonProps, href, isLoading, item, orientation, titleLink, withButtonLink,
1111
withTitleLink, width }) => {
1212
if (isLoading) {
1313
return (
@@ -43,7 +43,6 @@ const Item = ({ buttonLink, buttonProps, href, fromItemGroup, isLoading, item, o
4343
<CardBody
4444
buttonLink={link}
4545
buttonProps={buttonProps}
46-
fromItemGroup={fromItemGroup}
4746
item={item}
4847
orientation={orientation}
4948
titleLink={link}
@@ -62,7 +61,6 @@ const Item = ({ buttonLink, buttonProps, href, fromItemGroup, isLoading, item, o
6261
<CardBody
6362
buttonLink={link}
6463
buttonProps={buttonProps}
65-
fromItemGroup={fromItemGroup}
6664
item={item}
6765
orientation={orientation}
6866
titleLink={link}
@@ -100,7 +98,6 @@ Item.propTypes = {
10098
name: PropTypes.string.isRequired,
10199
slug: PropTypes.string,
102100
}),
103-
fromItemGroup: PropTypes.bool,
104101
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
105102
titleLink: PropTypes.string,
106103
withButtonLink: PropTypes.bool,
@@ -111,7 +108,6 @@ Item.propTypes = {
111108
Item.defaultProps = {
112109
buttonLink: '',
113110
buttonProps: LinkedButton.defaultProps,
114-
fromItemGroup: false,
115111
href: '',
116112
isLoading: false,
117113
item: {

src/compounds/ItemGroup/ItemGroup.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ const ItemGroup = ({ buttonProps, items, isLoading, orientation, withButtonLink,
3838
withButtonLink={withButtonLink}
3939
withTitleLink={withTitleLink}
4040
href={item.href}
41-
fromItemGroup={true}
4241
/>
4342
</Col>
4443
))

0 commit comments

Comments
 (0)