@@ -8,6 +8,7 @@ import LinkedButton from '../LinkedButton/LinkedButton'
8
8
const CardBody = ( { buttonLink, buttonProps, fromItemGroup, item,
9
9
orientation, titleLink, withButtonLink, withTitleLink } ) => {
10
10
const { id, description, name } = item
11
+
11
12
return (
12
13
< Card . Body className = { withButtonLink && 'd-flex flex-column' } >
13
14
< div className = { orientation === 'horizontal' ? 'd-block d-md-flex align-items-center justify-content-between' : '' } >
@@ -16,7 +17,7 @@ const CardBody = ({ buttonLink, buttonProps, fromItemGroup, item,
16
17
{ ( withTitleLink && fromItemGroup ) && (
17
18
< NextLink
18
19
text = { name }
19
- path = { { pathname : ` ${ titleLink } ` , query : { id : ` ${ id } ` } } }
20
+ path = { { pathname : titleLink , query : { id } } }
20
21
addClass = 'text-decoration-none link-hover'
21
22
/>
22
23
) }
@@ -38,7 +39,7 @@ const CardBody = ({ buttonLink, buttonProps, fromItemGroup, item,
38
39
< LinkedButton
39
40
addClass = { `item-button-${ orientation } item-link mt-auto` }
40
41
buttonProps = { buttonProps }
41
- path = { fromItemGroup ? { pathname : ` ${ buttonLink } ` , query : { id : ` ${ id } ` } } : buttonLink }
42
+ path = { { pathname : buttonLink , query : { id } } }
42
43
/>
43
44
</ div >
44
45
) }
@@ -57,7 +58,7 @@ CardBody.propTypes = {
57
58
// buttonProps: props => props.withButtonLink
58
59
// ? PropTypes.shape(Button.propTypes)
59
60
// : PropTypes.shape({ ...Button.propTypes, label: PropTypes.string })
60
- fromItemGroup : PropTypes . string ,
61
+ fromItemGroup : PropTypes . bool ,
61
62
item : PropTypes . shape ( {
62
63
description : PropTypes . string ,
63
64
id : PropTypes . number . isRequired ,
0 commit comments