dappros/ethora

View on GitHub
client-web/build-prod/static/js/29.c0927fd1.chunk.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[29],{47029:function(e,n,r){r.r(n),r.d(n,{default:function(){return v}});var t=r(74165),i=r(15861),l=r(70885),s=r(72791),c=r(21680),a=r(19773),o=r(24390),u=r(69963),d=r(9827),x=r(60807),h=r(56650),p=r(74142),m=r(50228),Z=r(4565),f=r(64880),j=r(80184),g=function(e){var n=e.blocks,r=(0,f.k6)(),t=(0,p.Z)();return(0,j.jsx)(m.Z,{sx:{padding:"10px"},children:(0,j.jsxs)(u.Z,{sx:{flex:1,marginTop:"10px",border:"3px solid "+t.palette.primary.main,borderRadius:"10px"},component:h.Z,children:[(0,j.jsx)(Z.Z,{variant:"h6",style:{margin:"16px"},color:"primary",children:"Blocks"}),(0,j.jsx)("div",{style:{height:3,backgroundColor:t.palette.primary.main,margin:"5px",borderRadius:5}}),(0,j.jsxs)(c.Z,{sx:{minWidth:650},"aria-label":"simple table",children:[(0,j.jsx)(d.Z,{children:(0,j.jsxs)(x.Z,{children:[(0,j.jsx)(o.Z,{align:"center",children:"Block Number"}),(0,j.jsx)(o.Z,{align:"center",children:"Timestamp"}),(0,j.jsx)(o.Z,{align:"center",children:"TXN"}),(0,j.jsx)(o.Z,{align:"center",children:"Uncles"}),(0,j.jsx)(o.Z,{align:"left",children:"Miner"})]})}),(0,j.jsx)(a.Z,{children:n.map((function(e){return(0,j.jsxs)(x.Z,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,j.jsx)(o.Z,{align:"center",style:{textDecoration:"underline",cursor:"pointer"},onClick:function(){return r.push("/explorer/block/"+e.number)},children:e.number}),(0,j.jsx)(o.Z,{align:"center",children:e.timestamp}),(0,j.jsx)(o.Z,{align:"center",children:e.transactions.length}),(0,j.jsx)(o.Z,{align:"center",children:e.uncles.length}),(0,j.jsx)(o.Z,{style:{overflowX:"hidden"},align:"left",children:e.miner})]},e.number)}))})]})]})})},b=r(45100),k=r(47409),v=function(e){var n=(0,s.useState)({total:0,limit:0,items:[],offset:0}),r=(0,l.Z)(n,2),c=r[0],a=r[1],o=(0,s.useState)(!0),u=(0,l.Z)(o,2),d=u[0],x=u[1],h=function(){var e=(0,i.Z)((0,t.Z)().mark((function e(){var n,r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.prev=1,e.next=4,(0,k.OQ)();case 4:n=e.sent,r=n.data,a(r),console.log(r),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),console.log(e.t0);case 13:x(!1);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(){return e.apply(this,arguments)}}();return(0,s.useEffect)((function(){h()}),[]),d?(0,j.jsx)(b.A,{}):(0,j.jsx)(g,{blocks:c.items})}}}]);
//# sourceMappingURL=29.c0927fd1.chunk.js.map