Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 26, 2020
1 parent 6e6e637 commit 4216c32
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/app/src/hooks/use-query-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import eq from '@/lib/eq'
const fromLocation = isSSR
? () => ({})
: () => {
const urlObj = new URL(window.location)
const query = Object.fromEntries(urlObj.searchParams.entries())
const decodeQuery = Object.keys(query).reduce(
(acc, key) => ({ ...acc, [key]: decodeURIComponent(query[key]) }),
{}
)
return decodeQuery
}
const urlObj = new URL(window.location)
const query = Object.fromEntries(urlObj.searchParams.entries())
const decodeQuery = Object.keys(query).reduce(
(acc, key) => ({ ...acc, [key]: decodeURIComponent(query[key]) }),
{}
)
return decodeQuery
}

const condition = isSSR ? [] : [window.location.search]

Expand Down

0 comments on commit 4216c32

Please sign in to comment.