fix remaining js issues

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

@ -1,6 +1,5 @@
import $ from 'jquery'
import _ from 'lodash'
import URI from 'urijs'
import humps from 'humps'
import { subscribeChannel } from '../../socket'
import { connectElements } from '../../lib/redux_helpers.js'
@ -28,12 +27,12 @@ export function reducer (state, action) {
const elements = {
'[data-search-field]': {
render ($el, state) {
$el
return $el
}
},
'[data-search-button]': {
render ($el, state) {
$el
return $el
}
},
'[data-cancel-search-button]': {
@ -62,8 +61,8 @@ if ($('[data-page="address-logs"]').length) {
store.dispatch({
type: 'START_SEARCH',
addressHash: addressHash})
var topic = $('[data-search-field]').val();
var path = "/search_logs?topic=" + topic + "&address_id=" + store.getState().addressHash
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))))

Loading…
Cancel
Save