diff --git a/.circleci/config.yml b/.circleci/config.yml index 349c4c5d3c..4c8a88a5ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -371,6 +371,7 @@ workflows: branches: only: - develop + - stat_marathon_match_link # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration diff --git a/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx b/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx index a4f45714c7..de48b50123 100644 --- a/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx +++ b/src/shared/components/ProfilePage/Stats/ChartTooltip/index.jsx @@ -5,11 +5,10 @@ import React from 'react'; import PT from 'prop-types'; import './styles.scss'; -import _ from 'lodash'; const ChartTooltip = ({ show, left, top, challengeName, - challengeData, rating, ratingColor, href, onClick, + challengeData, rating, ratingColor, href, }) => ( { - e.preventDefault(); - onClick(); - }} >
{rating} @@ -49,7 +44,6 @@ ChartTooltip.defaultProps = { rating: 0, ratingColor: '', href: null, - onClick: _.noop, }; ChartTooltip.propTypes = { @@ -61,7 +55,6 @@ ChartTooltip.propTypes = { rating: PT.number, ratingColor: PT.string, href: PT.string, - onClick: PT.func, }; export default ChartTooltip; diff --git a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx index aa8affeae0..aa274eb69f 100644 --- a/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx +++ b/src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx @@ -15,7 +15,6 @@ export default class HistoryGraph extends React.Component { this.state = {}; this.mobileWidth = 0; this.graphRef = React.createRef(); - this.onHandleDataPointClicked = this.onHandleDataPointClicked.bind(this); } componentDidMount() { @@ -59,23 +58,6 @@ export default class HistoryGraph extends React.Component { return 300; } - onHandleDataPointClicked() { - const { challengeId, href } = this.state; - fetch(`${config.API.V5}/challenges?legacyId=${challengeId}`) - .then(result => result.json()) - .then((dataResponse) => { - if (dataResponse.length > 0) { - const challenge = dataResponse[0]; - window.location.href = `${config.URL.CHALLENGES_URL}/${challenge.id}`; - } else { - window.location.href = href; - } - }).catch(() => { - window.location.href = href; - }); - } - - draw() { const $scope = this; const { history: wrapper, track, subTrack } = this.props; @@ -230,7 +212,7 @@ export default class HistoryGraph extends React.Component { } if (track === 'DATA_SCIENCE') { if (subTrack === 'MARATHON_MATCH') { - return `${config.URL.COMMUNITY}/tc?module=MatchDetails&rd=${challengeId}`; + return `${config.URL.CHALLENGES_URL}/${challengeId}`; } if (subTrack === 'SRM') { return `${config.URL.COMMUNITY}/stat?c=round_overview&rd=${challengeId}`; @@ -265,7 +247,6 @@ export default class HistoryGraph extends React.Component { show: true, left: e.pageX, top: e.pageY, - challengeId: d.challengeId, challengeName: d.challengeName, challengeData: moment(d.ratingDate).format('MMM DD, YYYY'), rating: d.newRating, @@ -278,18 +259,7 @@ export default class HistoryGraph extends React.Component { render() { return (
- { - const { track } = this.props; - const { href } = this.state; - if (track === 'DATA_SCIENCE') { - this.onHandleDataPointClicked(); - } else { - window.location.href = href; - } - }} - /> +
); }