import { translate } from '../../../helpers/l10n';
import { Metric, Component, BranchLike } from '../../../app/types';
import { History } from '../../../api/time-machine';
-import { getBranchLikeQuery } from '../../../helpers/branches';
+import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches';
import { getActivityUrl } from '../../../helpers/urls';
interface Props {
}
componentDidUpdate(prevProps: Props) {
- if (prevProps.component !== this.props.component) {
+ if (
+ prevProps.component.key !== this.props.component.key ||
+ !isSameBranchLike(prevProps.branchLike, this.props.branchLike)
+ ) {
this.fetchData();
}
}