Cleanup
This commit is contained in:
parent
89bac8953b
commit
152cf7f7b3
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user