mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Block explorer blocks mined page fixed
This commit is contained in:
parent
ffbaa8b20f
commit
4bea6ac814
3 changed files with 25 additions and 32 deletions
|
|
@ -33,18 +33,18 @@ class BlocksMinedTable extends Component {
|
|||
let combinedClasses = ['responsive-table', classes.table];
|
||||
return (
|
||||
<table className={combinedClasses.join(' ')}>
|
||||
<thead className={classes.tHead}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Height</th>
|
||||
<th scope="col">Block Hash</th>
|
||||
<th scope="col">Age</th>
|
||||
<th scope="col">Txn</th>
|
||||
<th scope="col">Uncles</th>
|
||||
<th scope="col">Coinbase</th>
|
||||
<th scope="col">GasUsed</th>
|
||||
<th scope="col">GasLimit</th>
|
||||
<th scope="col">Avg.GasPrice</th>
|
||||
<th scope="col">Reward</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Height</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Block Hash</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Age</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Txn</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Uncles</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Coinbase</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>GasUsed</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>GasLimit</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Avg.GasPrice</th>
|
||||
<th scope="col" style={{fontSize: "8pt", backgroundColor: "white", color: "#4f2e7e"}}>Reward</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{table}
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@ import { Link } from 'react-router-dom'
|
|||
const MinedBlockTable = (props) => {
|
||||
return (
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><Link to="/blocks/detail" onClick={() => props.detailBlockHandler(props.Number)}>
|
||||
<tr style={{ borderTop: '1px solid #e0defb' }}>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}><Link to="/blocks/detail" onClick={() => props.detailBlockHandler(props.Number)}>
|
||||
{props.Number}
|
||||
</Link></td>
|
||||
<td className={classes.addressTag}>{props.Hash}</td>
|
||||
<td>{props.AgeGet}</td>
|
||||
<td>{props.TxCount}</td>
|
||||
<td>{props.UncleCount}</td>
|
||||
<td className={classes.addressTag}>{props.Coinbase}</td>
|
||||
<td>{props.GasUsed}</td>
|
||||
<td>{props.GasLimit}</td>
|
||||
<td>TBD</td>
|
||||
<td>{props.Reward}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }} className={classes.addressTag}>{props.Hash}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}>{props.AgeGet}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}>{props.TxCount}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}>{props.UncleCount}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}className={classes.addressTag}>{props.Coinbase}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}>{props.GasUsed}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}>{props.GasLimit}</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}>TBD</td>
|
||||
<td style={{ paddingLeft: '30pt', paddingBottom: '7.5pt', paddingTop: '7.5pt' }}>{props.Reward}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -72,11 +72,9 @@ class App extends Component {
|
|||
|
||||
detailAccountHandler = async(addr) => {
|
||||
|
||||
console.log("[DETAIL ACCOUNT Handler]");
|
||||
|
||||
try {
|
||||
const response = await axios.get(`http://localhost:8080/api/get_account_txs/${addr}`)
|
||||
await this.setState({ accountDetailData: response.data, reqAccount: addr, overlayTriggered: true, overlayContent: "account" })
|
||||
await this.setState({ accountDetailData: response.data, reqAccount: addr, overlayTriggered: false })
|
||||
}
|
||||
catch(error) {
|
||||
console.log(error)
|
||||
|
|
@ -257,9 +255,7 @@ class App extends Component {
|
|||
/>
|
||||
|
||||
<Route path="/mined/blocks" exact render={({match}) =>
|
||||
<div>
|
||||
<BlockCoinbaseHeader
|
||||
coinbase={this.state.reqCoinbase}/>
|
||||
<div>
|
||||
<BlocksMinedTable
|
||||
getBlockTransactions={this.getBlockTransactions}
|
||||
getBlocksMined={this.getBlocksMined}
|
||||
|
|
@ -268,10 +264,7 @@ class App extends Component {
|
|||
/>
|
||||
|
||||
<Route path="/account/detail" exact render={({match}) =>
|
||||
<div>
|
||||
{/* <AccountDetailHeader
|
||||
addr={this.state.reqAccount}
|
||||
data={this.state.accountDetailData}/> */}
|
||||
<div>
|
||||
<DetailAccountsTable
|
||||
transactionDetailHandler={this.detailTransactionHandler}
|
||||
addr={this.state.reqAccount}
|
||||
|
|
|
|||
Loading…
Reference in a new issue