score:1

Accepted answer

it looks like the way you created the component, if no transitions were passed, it does return undefined, you could fix it by returning null if transactions is undefined.

this would do the trick:

const data = () => {
  return (
    !transactions ? null :
    transactions.map((t) => (
      <block
        from={t.from_account}
        to={t.to_account}
        type={t.type}
        amount={t.amount}
        currency={"hat"}
        time={converteddate}
        key={t.transaction_id}
      />
    ))
  );
};

Related Query

More Query from same tag