import { History } from 'history' ; import { isEmpty } from 'lodash' ; import { push } from '../links/url_helpers' ; export function pushNewItemToKueryBar ( { kuery , history , key , value , } ) { const newItem = `${ key } :"${ value }"` ; const nextKuery = isEmpty ( kuery ) ? newItem : `${ kuery } and ${ newItem }` ; push ( history , { query : { kuery : nextKuery } , } ) ; }