Commit b7717d7c authored by Tamás Danis's avatar Tamás Danis

no render empty element

parent b504e7ae
......@@ -15,6 +15,8 @@ import {
import moment from 'moment';
const SpendingChart = ({ transactions, user }) => {
if (!transactions.length) return <></>;
const countPrice = transaction => {
let res = 0;
transaction.products.forEach(product => {
......
......@@ -10,6 +10,7 @@ const TransactionList = ({ actions, transactions }) => {
useEffect(() => {
actions.fetchTransactions();
}, []);
if (!transactions.length) return <></>;
return (
<div className="card mt-5">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment