Skip to content

Commit

Permalink
Use location from react router
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanflorence committed Jan 16, 2020
1 parent 9c79497 commit 3111b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/YesterTech/Pagination.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'
import { Link, useLocation } from 'react-router-dom'
import classnames from 'classnames'
import queryString from 'query-string'

Expand All @@ -14,7 +14,7 @@ export function Pagination({
resultsPerPage = 10,
...rest
}) {
const query = queryString.parse(window.location.search)
const query = queryString.parse(useLocation().search)
const pages = Math.ceil(totalResults / resultsPerPage)

return (
Expand Down

0 comments on commit 3111b1e

Please sign in to comment.