in this page the user displays a table with three columns, one for tipo_esame (string), one for data_esame(string), one for uri (BLOB).
const archivioItems = this.state.archivio.map((archivio, i) => {
return (
<tr key={archivio.hash_referto}>
<td>{archivio.tipo_esame}</td>
<td>{archivio.data_esame}</td>
<td>{archivio.uri}</td>
</tr>
)
})
<table className="fixed_header">
<thead>
<tr >
<th >Tipo esame</th>
<th> Data Esame</th>
<th>Vedi Referto</th>
</tr >
</thead>
<tbody>
{archivioItems}
</tbody>
</table>
</div>
)
}
}
but i got an error because Objects are not valid as react child. So I stringified the object
{JSON.stringify(archivio.uri)}
So now i get the BLOB in the table as a string. I would like to display an icon in the uri column, and when i click on it, it displays the content of the buffer (i mean the document). Is there a solution?