From: Grégoire Aubert Date: Mon, 7 Aug 2017 08:20:09 +0000 (+0200) Subject: SONAR-9603 Fix broken browser history after clicking on the project activity preview... X-Git-Tag: 6.6-RC1~670 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b1ab22e63bba4a4b7629ea69108d9c57a4e7f5d8;p=sonarqube.git SONAR-9603 Fix broken browser history after clicking on the project activity preview graph --- diff --git a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js index a52e8fc6a74..5e6004a3aae 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js +++ b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js @@ -32,7 +32,7 @@ type Props = { history: ?History, project: string, qualifier: string, - router: { replace: ({ pathname: string, query?: {} }) => void } + router: { push: ({ pathname: string, query?: {} }) => void } }; type State = { diff --git a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js index 5ecdab56437..56b92e0397d 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js +++ b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js @@ -41,7 +41,7 @@ type Props = { history: ?History, metrics: Array, project: string, - router: { replace: ({ pathname: string, query?: {} }) => void } + router: { push: ({ pathname: string, query?: {} }) => void } }; type State = { @@ -133,7 +133,7 @@ export default class PreviewGraph extends React.PureComponent { }; handleClick = () => { - this.props.router.replace({ pathname: '/project/activity', query: { id: this.props.project } }); + this.props.router.push({ pathname: '/project/activity', query: { id: this.props.project } }); }; updateTooltip = (selectedDate: ?Date, tooltipXPos: ?number, tooltipIdx: ?number) =>