File tree Expand file tree Collapse file tree
apps/webapp/app/components/primitives/charts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,9 +28,11 @@ export function ChartBarNoData() {
2828 < Paragraph variant = "small" spacing >
2929 There's no data available for the filters you've set.
3030 </ Paragraph >
31- < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
32- Clear filters
33- </ Button >
31+ { dateRange && (
32+ < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
33+ Clear filters
34+ </ Button >
35+ ) }
3436 </ div >
3537 </ div >
3638 ) ;
@@ -47,9 +49,11 @@ export function ChartBarInvalid() {
4749 < Paragraph variant = "small" spacing >
4850 Your current filter settings don't apply to this chart's data type.
4951 </ Paragraph >
50- < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
51- Clear filters
52- </ Button >
52+ { dateRange && (
53+ < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
54+ Clear filters
55+ </ Button >
56+ ) }
5357 </ div >
5458 </ div >
5559 ) ;
@@ -78,9 +82,11 @@ export function ChartLineNoData() {
7882 < Paragraph variant = "small" spacing >
7983 There's no data available for the filters you've set.
8084 </ Paragraph >
81- < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
82- Clear filters
83- </ Button >
85+ { dateRange && (
86+ < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
87+ Clear filters
88+ </ Button >
89+ ) }
8490 </ div >
8591 </ div >
8692 ) ;
@@ -97,9 +103,11 @@ export function ChartLineInvalid() {
97103 < Paragraph variant = "small" spacing >
98104 Your current filter settings don't apply to this chart's data type.
99105 </ Paragraph >
100- < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
101- Clear filters
102- </ Button >
106+ { dateRange && (
107+ < Button variant = "secondary/small" onClick = { dateRange . resetDateRange } >
108+ Clear filters
109+ </ Button >
110+ ) }
103111 </ div >
104112 </ div >
105113 ) ;
You can’t perform that action at this time.
0 commit comments