Handle reload for address's first transaction

Co-authored-by: Stamates <stamates@hotmail.com>
pull/333/head
jimmay5469 7 years ago
parent 5a0ee2bc87
commit 62dc04a75b
  1. 7
      apps/explorer_web/assets/js/pages/address.js
  2. 2
      apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex

@ -7,6 +7,13 @@ if (window.page === 'address') {
.receive('ok', resp => { console.log('Joined successfully', `addresses:${window.addressHash}`, resp) })
.receive('error', resp => { console.log('Unable to join', `addresses:${window.addressHash}`, resp) })
const $emptyTransactionsList = $('[data-selector="empty-transactions-list"]')
if ($emptyTransactionsList) {
channel.on('transaction', () => {
window.location.reload()
})
}
const $transactionsList = $('[data-selector="transactions-list"]')
if ($transactionsList) {
channel.on('transaction', (msg) => {

@ -100,7 +100,7 @@
</tbody>
</table>
<% else %>
<p><%= gettext "There are no Transactions" %></p>
<p data-selector="empty-transactions-list"><%= gettext "There are no Transactions" %></p>
<% end %>
</div>
</div>

Loading…
Cancel
Save