File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,10 @@ import { TransactionInterface } from '../../interfaces/transaction';
9
9
import { ChartInterface , KeyValueNumberInterface } from '../../interfaces/charts' ;
10
10
import { formatToChartNumberObject , capitalize } from '../../utils/format' ;
11
11
import { globalVariables } from '../../styles/variables' ;
12
- import { ChartDataProps } from '../../pages/Dashboard/Report' ;
13
12
14
13
import { Loading } from './styles' ;
15
14
16
- const PieChart : React . FC < ChartDataProps > = ( { onEmpty } ) => {
15
+ const PieChart : React . FC = ( ) => {
17
16
let debitsFormatted : ChartInterface [ ] ;
18
17
let debits : TransactionInterface [ ] ;
19
18
@@ -36,12 +35,6 @@ const PieChart: React.FC<ChartDataProps> = ({ onEmpty }) => {
36
35
const getAllDataByCurrentMonth = async ( ) => {
37
36
const { data : debitData } = await api . get < TransactionInterface [ ] > ( 'debits/allByCurrentMonth' ) ;
38
37
39
- if ( debitData . length === 0 ) {
40
- onEmpty ( ) ;
41
-
42
- return ;
43
- }
44
-
45
38
debits = debitData ;
46
39
47
40
formatTransactions ( ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const Report = () => {
26
26
< LineChart onEmpty = { onEmpty } />
27
27
< BottomContainer >
28
28
< BarChart onEmpty = { onEmpty } />
29
- < PieChart onEmpty = { onEmpty } />
29
+ < PieChart />
30
30
</ BottomContainer >
31
31
</ >
32
32
) }
You can’t perform that action at this time.
0 commit comments