diff --git a/src/components/Articles/Categories/Categories.js b/src/components/Articles/Categories/Categories.js index 29e38ee..3cf709e 100644 --- a/src/components/Articles/Categories/Categories.js +++ b/src/components/Articles/Categories/Categories.js @@ -1,10 +1,17 @@ import React from 'react'; +import { useLocation } from '@reach/router' import { Link } from 'gatsby' -const Categories = ({ children, pathname, setQuery }) => { +const Categories = ({ children, setQuery = () => null }) => { + const { search, pathname } = useLocation() + return (