From 9e6da544d90abf244104187a97e622fda6be46a1 Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 11 Sep 2019 16:59:01 +0800 Subject: [PATCH] fix(neuron-ui): fix the transaction detail view 1. hide the deprecated block hash 2. fix the display of cell out point --- .../src/components/Transaction/index.tsx | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/neuron-ui/src/components/Transaction/index.tsx b/packages/neuron-ui/src/components/Transaction/index.tsx index ecd72826d1..f1d18261be 100644 --- a/packages/neuron-ui/src/components/Transaction/index.tsx +++ b/packages/neuron-ui/src/components/Transaction/index.tsx @@ -16,23 +16,25 @@ const inputColumns: IColumn[] = [ key: 'lockHash', name: 'Lock Hash', minWidth: 100, - maxWidth: 525, - }, - { - key: 'outPointBlockHash', - name: 'OutPoint BlockHash', - minWidth: 150, - onRender: (item: any) => {item.previousOutput.blockHash || 'none'}, + maxWidth: 200, + onRender: (item: any) => ( + + {item.lockHash || 'none'} + + ), }, { key: 'outPointCell', name: 'OutPoint Cell', minWidth: 150, - onRender: (item: any) => ( - - {item.previousOutput.cell ? `${item.previousOutput.cell.txHash}[${item.previousOutput.cell.index}]` : 'none'} - - ), + onRender: (item: any) => { + const text = item.previousOutput ? `${item.previousOutput.txHash}[${item.previousOutput.index}]` : 'none' + return ( + + {text} + + ) + }, }, { key: 'capacity',