From 152cf7f7b384cbf8f60fc22c78b40511ca5e5821 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sun, 13 Jan 2019 11:00:38 -0500 Subject: [PATCH] Cleanup --- src/components/App/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/App/index.js b/src/components/App/index.js index b4a7303..f85ea43 100644 --- a/src/components/App/index.js +++ b/src/components/App/index.js @@ -8,8 +8,6 @@ import FormActions from 'components/FormActions'; import Loader from 'components/Loader'; import Message from 'components/Message'; -const toUrl = params => new URLSearchParams(params).toString(); - class App extends React.PureComponent { state = { loading: false, @@ -33,7 +31,10 @@ class App extends React.PureComponent { handleSubmit = ({ syntax, expr }) => { if (expr) { - document.location.hash = toUrl({ syntax, expr }); + document.location.hash = new URLSearchParams({ + syntax, + expr + }).toString(); } }