Skip to content

Commit

Permalink
[Security Solution] fix panel links (#71148)
Browse files Browse the repository at this point in the history
panel.tsx was relying on `useHistory` to cause a rerender but it
doesn't. `useLocation` does.
  • Loading branch information
Robert Austin authored Jul 8, 2020
1 parent 43c6fbf commit 17454e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import React, {
useEffect,
} from 'react';
import { useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { useHistory, useLocation } from 'react-router-dom';
// eslint-disable-next-line import/no-nodejs-modules
import querystring from 'querystring';
import { EuiPanel } from '@elastic/eui';
Expand Down Expand Up @@ -48,7 +48,7 @@ import { CrumbInfo } from './panels/panel_content_utilities';
*/
const PanelContent = memo(function PanelContent() {
const history = useHistory();
const urlSearch = history.location.search;
const urlSearch = useLocation().search;
const dispatch = useResolverDispatch();

const { timestamp } = useContext(SideEffectContext);
Expand Down

0 comments on commit 17454e2

Please sign in to comment.