feature/default_network_editable
Alexander Tseung 7 years ago
commit 2240688fd4
  1. 57
      ui/app/components/shift-list-item.js
  2. 7
      ui/app/components/tx-list.js

@ -29,40 +29,35 @@ function ShiftListItem () {
} }
ShiftListItem.prototype.render = function () { ShiftListItem.prototype.render = function () {
const { selectedAddress, receivingAddress } = this.props return h('div.tx-list-item.tx-list-clickable', {
return ( style: {
selectedAddress === receivingAddress paddingTop: '20px',
? h('div.tx-list-item.tx-list-clickable', { paddingBottom: '20px',
justifyContent: 'space-around',
alignItems: 'center',
},
}, [
h('div', {
style: {
width: '0px',
position: 'relative',
bottom: '19px',
},
}, [
h('img', {
src: 'https://info.shapeshift.io/sites/default/files/logo.png',
style: { style: {
paddingTop: '20px', height: '35px',
paddingBottom: '20px', width: '132px',
justifyContent: 'space-around', position: 'absolute',
alignItems: 'center', clip: 'rect(0px,23px,34px,0px)',
}, },
}, [ }),
h('div', { ]),
style: {
width: '0px',
position: 'relative',
bottom: '19px',
},
}, [
h('img', {
src: 'https://info.shapeshift.io/sites/default/files/logo.png',
style: {
height: '35px',
width: '132px',
position: 'absolute',
clip: 'rect(0px,23px,34px,0px)',
},
}),
]),
this.renderInfo(), this.renderInfo(),
this.renderUtilComponents(), this.renderUtilComponents(),
]) ])
: null
)
} }
function formatDate (date) { function formatDate (date) {

@ -56,6 +56,7 @@ TxList.prototype.render = function () {
TxList.prototype.renderTransaction = function () { TxList.prototype.renderTransaction = function () {
const { txsToRender, conversionRate } = this.props const { txsToRender, conversionRate } = this.props
return txsToRender.length return txsToRender.length
? txsToRender.map((transaction, i) => this.renderTransactionListItem(transaction, conversionRate, i)) ? txsToRender.map((transaction, i) => this.renderTransactionListItem(transaction, conversionRate, i))
: [h( : [h(
@ -71,11 +72,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
// refer to transaction-list.js:line 58 // refer to transaction-list.js:line 58
if (transaction.key === 'shapeshift') { if (transaction.key === 'shapeshift') {
return h('div', { return h(ShiftListItem, { ...transaction, key: `shapeshift${index}` })
key: `shapeshift${index}`,
}, [
h(ShiftListItem, transaction),
])
} }
const props = { const props = {

Loading…
Cancel
Save