This commit is contained in:
Jeff Avallone 2019-01-13 11:00:38 -05:00
parent 89bac8953b
commit 152cf7f7b3

View File

@ -8,8 +8,6 @@ import FormActions from 'components/FormActions';
import Loader from 'components/Loader'; import Loader from 'components/Loader';
import Message from 'components/Message'; import Message from 'components/Message';
const toUrl = params => new URLSearchParams(params).toString();
class App extends React.PureComponent { class App extends React.PureComponent {
state = { state = {
loading: false, loading: false,
@ -33,7 +31,10 @@ class App extends React.PureComponent {
handleSubmit = ({ syntax, expr }) => { handleSubmit = ({ syntax, expr }) => {
if (expr) { if (expr) {
document.location.hash = toUrl({ syntax, expr }); document.location.hash = new URLSearchParams({
syntax,
expr
}).toString();
} }
} }