@@ -29,6 +29,7 @@ interface GrowthSourcesTableProps {
29
29
const GrowthSourcesTableBody : React . FC < GrowthSourcesTableProps > = ( { data, currencySymbol, limit, defaultSourceIconUrl} ) => {
30
30
// Data is already sorted by the backend, so we just need to apply limit if specified
31
31
const displayData = limit ? data . slice ( 0 , limit ) : data ;
32
+ const { appSettings} = useAppContext ( ) ;
32
33
33
34
return (
34
35
< TableBody >
@@ -61,12 +62,16 @@ const GrowthSourcesTableBody: React.FC<GrowthSourcesTableProps> = ({data, curren
61
62
< TableCell className = 'text-right font-mono text-sm' >
62
63
+{ formatNumber ( row . free_members ) }
63
64
</ TableCell >
64
- < TableCell className = 'text-right font-mono text-sm' >
65
+ { appSettings ?. paidMembersEnabled &&
66
+ < >
67
+ < TableCell className = 'text-right font-mono text-sm' >
65
68
+{ formatNumber ( row . paid_members ) }
66
- </ TableCell >
67
- < TableCell className = 'text-right font-mono text-sm' >
69
+ </ TableCell >
70
+ < TableCell className = 'text-right font-mono text-sm' >
68
71
+{ currencySymbol } { centsToDollars ( row . mrr ) }
69
- </ TableCell >
72
+ </ TableCell >
73
+ </ >
74
+ }
70
75
</ TableRow >
71
76
) ) }
72
77
</ TableBody >
@@ -242,23 +247,27 @@ export const GrowthSources: React.FC<GrowthSourcesProps> = ({
242
247
< TableHeader >
243
248
< TableRow >
244
249
< TableHead >
245
- Source
250
+ Source
246
251
</ TableHead >
247
252
< TableHead className = 'w-[110px] text-right' >
248
253
< SortButton activeSortBy = { sortBy } setSortBy = { setSortBy } sortBy = 'free_members desc' >
249
- Free members
250
- </ SortButton >
251
- </ TableHead >
252
- < TableHead className = 'w-[110px] text-right' >
253
- < SortButton activeSortBy = { sortBy } setSortBy = { setSortBy } sortBy = 'paid_members desc' >
254
- Paid members
255
- </ SortButton >
256
- </ TableHead >
257
- < TableHead className = 'w-[110px] text-right' >
258
- < SortButton activeSortBy = { sortBy } setSortBy = { setSortBy } sortBy = 'mrr desc' >
259
- MRR impact
254
+ Free members
260
255
</ SortButton >
261
256
</ TableHead >
257
+ { appSettings ?. paidMembersEnabled &&
258
+ < >
259
+ < TableHead className = 'w-[110px] text-right' >
260
+ < SortButton activeSortBy = { sortBy } setSortBy = { setSortBy } sortBy = 'paid_members desc' >
261
+ Paid members
262
+ </ SortButton >
263
+ </ TableHead >
264
+ < TableHead className = 'w-[110px] text-right' >
265
+ < SortButton activeSortBy = { sortBy } setSortBy = { setSortBy } sortBy = 'mrr desc' >
266
+ MRR impact
267
+ </ SortButton >
268
+ </ TableHead >
269
+ </ >
270
+ }
262
271
</ TableRow >
263
272
</ TableHeader >
264
273
< GrowthSourcesTableBody
@@ -278,4 +287,4 @@ export const GrowthSources: React.FC<GrowthSourcesProps> = ({
278
287
) ;
279
288
} ;
280
289
281
- export default GrowthSources ;
290
+ export default GrowthSources ;
0 commit comments