import React from 'react'; import { connect } from 'react-redux'; import { Link, NavLink } from 'react-router-dom'; import { filter_subscribe } from '../actions/filter_subscribe'; import { push } from 'react-router-redux'; import query from 'query-string'; function search_qs(text) { const qs = query.stringify({ ...query.parse(location.search), s: text || undefined }); return `${ location.pathname === "/" ? location.pathname : "" }${qs && "?" + qs}`; } function update_filter(text, fs, location, dispatch) { dispatch(push(search_qs(text))); } function render(props) { const { dispatch, router } = props; const qs = query.parse(router.location.search); const navto = where => e => { e.preventDefault(); dispatch(push(where)); }; return ; } export default connect(state => ({ filter_subscribe: state.filter_subscribe, router: state.router, }))(render);