diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ca121ae7..3710ce7b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,8 @@ jobs: run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}" >> .npmrc npm whoami + - name: Clean NPM + run: npm run clean - name: Install and Setup Dependencies run: npm ci # build must come before running linting and tests for the `dist` directory to exist. diff --git a/packages/catalog-search/src/SearchContext.jsx b/packages/catalog-search/src/SearchContext.jsx index 7166763ba..a68b6cf18 100644 --- a/packages/catalog-search/src/SearchContext.jsx +++ b/packages/catalog-search/src/SearchContext.jsx @@ -3,7 +3,7 @@ import React, { createContext, useReducer, useMemo, useEffect, } from 'react'; import PropTypes from 'prop-types'; -import { useLocation, useHistory } from 'react-router-dom'; +import { useLocation, useNavigate } from 'react-router-dom'; import { useIsFirstRender } from '@edx/frontend-enterprise-utils'; import { @@ -44,7 +44,7 @@ const SearchData = ({ children, searchFacetFilters, trackingName }) => { ); const { pathname, search } = useLocation(); - const navigate = useHistory(); + const navigate = useNavigate(); /** * Applies initial URL query params on page load to the refinements