Added key to a non-shorthand react fragment

This commit is contained in:
sam-keen 2022-03-03 17:20:55 +00:00 committed by Dexter Edwards
parent afeabc1ba2
commit abe2ecaafc

View File

@ -1,3 +1,4 @@
import React from 'react';
import { TendermintBlockchainResponse } from '../../../routes/blocks/tendermint-blockchain-response'; import { TendermintBlockchainResponse } from '../../../routes/blocks/tendermint-blockchain-response';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { SecondsAgo } from '../../seconds-ago'; import { SecondsAgo } from '../../seconds-ago';
@ -16,9 +17,9 @@ export const BlocksTable = ({ data, showTransactions }: BlocksProps) => {
return ( return (
<Table> <Table>
{data.result?.block_metas?.map((block) => { {data.result?.block_metas?.map((block, index) => {
return ( return (
<> <React.Fragment key={index}>
<tr> <tr>
<td> <td>
<Link to={`/blocks/${block.header?.height}`}> <Link to={`/blocks/${block.header?.height}`}>
@ -44,7 +45,7 @@ export const BlocksTable = ({ data, showTransactions }: BlocksProps) => {
<TxsPerBlock blockHeight={block.header?.height} /> <TxsPerBlock blockHeight={block.header?.height} />
</tr> </tr>
)} )}
</> </React.Fragment>
); );
})} })}
</Table> </Table>