@@ -31,43 +31,10 @@ export const ChartGroupCard = ({ chartGroup }: ChartGroupCardProps) => {
31
31
32
32
const GROUP_EDIT_LINK = getChartGroupURL ( chartGroup . id )
33
33
34
- const renderCardInfo = ( ) => (
35
- < div className = "flexbox-col flex-grow-1 dc__gap-8" >
36
- < div className = "flexbox-col dc__gap-2" >
37
- < div className = "flex left" >
38
- < InteractiveCellText
39
- text = { chartGroup . name }
40
- rootClassName = "fw-6 chart-grid-item__title cn-9"
41
- fontSize = { 14 }
42
- />
43
- < div className = "chart-name__arrow dc__no-shrink flex" >
44
- < Icon name = "ic-caret-down-small" color = "B500" rotateBy = { 270 } />
45
- </ div >
46
- </ div >
47
- </ div >
48
-
49
- < span className = { `fw-4 fs-13 lh-1-5 ${ getDescriptionTruncate ( { } ) } ` } >
50
- { chartGroup . description || 'No description' }
51
- </ span >
52
- </ div >
53
- )
54
-
55
34
const handleClick = ( ) => {
56
35
handleAnalyticsEvent ( { category : 'Chart Store' , action : 'CS_CHART_GROUP_CARD_CLICKED' } )
57
36
}
58
37
59
- const renderFooter = ( ) => (
60
- < div className = "flex left dc__content-space dc__border-top-n1 px-20 py-16 dc__gap-6" >
61
- < div className = "flex" >
62
- { getAlphabetIcon ( chartGroup . createdBy ) }
63
- < InteractiveCellText text = { chartGroup . createdBy } rootClassName = "cn-7 lh-1-5" fontSize = { 12 } />
64
- </ div >
65
- < span className = "lh-20 dc__truncate m-0 dc__align-item-left cn-7 lh-1-5 dc__mxw-120 fs-12" >
66
- { chartGroup . chartGroupEntries ?. length || 0 } charts
67
- </ span >
68
- </ div >
69
- )
70
-
71
38
return (
72
39
< Link
73
40
key = { chartGroup . id }
@@ -94,10 +61,35 @@ export const ChartGroupCard = ({ chartGroup }: ChartGroupCardProps) => {
94
61
</ div >
95
62
) }
96
63
</ div >
97
- { renderCardInfo ( ) }
64
+ < div className = "flexbox-col flex-grow-1 dc__gap-8" >
65
+ < div className = "flexbox-col dc__gap-2" >
66
+ < div className = "flex left" >
67
+ < InteractiveCellText
68
+ text = { chartGroup . name }
69
+ rootClassName = "fw-6 chart-grid-item__title cn-9"
70
+ fontSize = { 14 }
71
+ />
72
+ < div className = "chart-name__arrow dc__no-shrink flex" >
73
+ < Icon name = "ic-caret-down-small" color = "B500" rotateBy = { 270 } />
74
+ </ div >
75
+ </ div >
76
+ </ div >
77
+
78
+ < span className = { `fw-4 fs-13 lh-1-5 ${ getDescriptionTruncate ( { } ) } ` } >
79
+ { chartGroup . description || 'No description' }
80
+ </ span >
81
+ </ div >
98
82
</ div >
99
83
100
- { renderFooter ( ) }
84
+ < div className = "flex left dc__content-space dc__border-top-n1 px-20 py-16 dc__gap-6" >
85
+ < div className = "flex" >
86
+ { getAlphabetIcon ( chartGroup . createdBy ) }
87
+ < InteractiveCellText text = { chartGroup . createdBy } rootClassName = "cn-7 lh-1-5" fontSize = { 12 } />
88
+ </ div >
89
+ < span className = "lh-20 dc__truncate m-0 dc__align-item-left cn-7 lh-1-5 dc__mxw-120 fs-12" >
90
+ { chartGroup . chartGroupEntries ?. length || 0 } charts
91
+ </ span >
92
+ </ div >
101
93
</ Link >
102
94
)
103
95
}
0 commit comments