remove function

pull/2056/head
Ayrat Badykov 6 years ago
parent 3a3e8cf260
commit 40d50cef4c
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 18
      apps/block_scout_web/assets/js/pages/address/logs.js

@ -47,16 +47,6 @@ const elements = {
}
}
function loadSearchItems () {
var topic = $('[data-search-field]').val();
var path = "/search_logs?topic=" + topic + "&address_id=" + store.getState().addressHash
store.dispatch({type: 'START_REQUEST'})
$.getJSON(path, {type: 'JSON'})
.done(response => store.dispatch(Object.assign({type: 'ITEMS_FETCHED'}, humps.camelizeKeys(response))))
.fail(() => store.dispatch({type: 'REQUEST_ERROR'}))
.always(() => store.dispatch({type: 'FINISH_REQUEST'}))
}
if ($('[data-page="address-logs"]').length) {
const store = createAsyncLoadStore(reducer, initialState, 'dataset.identifierHash')
const addressHash = $('[data-page="address-details"]')[0].dataset.pageAddressHash
@ -72,7 +62,13 @@ if ($('[data-page="address-logs"]').length) {
store.dispatch({
type: 'START_SEARCH',
addressHash: addressHash})
loadSearchItems()
var topic = $('[data-search-field]').val();
var path = "/search_logs?topic=" + topic + "&address_id=" + store.getState().addressHash
store.dispatch({type: 'START_REQUEST'})
$.getJSON(path, {type: 'JSON'})
.done(response => store.dispatch(Object.assign({type: 'ITEMS_FETCHED'}, humps.camelizeKeys(response))))
.fail(() => store.dispatch({type: 'REQUEST_ERROR'}))
.always(() => store.dispatch({type: 'FINISH_REQUEST'}))
})
$element.on('click', '[data-cancel-search-button]', (event) => {

Loading…
Cancel
Save