import { SET_URL } from '../constants/action-types' function pushState(url) { if (url !== window.location.pathname) { window.history.pushState({}, '', url) } } export function setUrl(text) { pushState(text) return { type: SET_URL, text } }