Skip to content

Commit 3083647

Browse files
[chore] Remove history from ResultItem (jaegertracing#3361)
<!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - Resolves part of jaegertracing#2531 ## Description of the changes - While trying to understand usage og `history` package, I came across jaegertracing#3312 and quoting @Parship12 from there the use of history here was- "Just to tell typescript "this prop should be a valid location for navigation". We don't need the history package as a dependency just for types, we can use React.ComponentProps<typeof Link>['to'] instead.." ## How was this change tested? - npm run prettier - npm run lint - npm test (no test affected by this change so nothing breaks) ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` Signed-off-by: insane-22 <bhumikabachchan11315@gmail.com> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
1 parent 9ebc6bd commit 3083647

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • packages/jaeger-ui/src/components/SearchTracePage/SearchResults

packages/jaeger-ui/src/components/SearchTracePage/SearchResults/ResultItem.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import * as React from 'react';
55
import { Col, Divider, Row, Tag } from 'antd';
6-
import { LocationDescriptor } from 'history';
76
import { Link } from 'react-router-dom';
87

98
import _sortBy from 'lodash/sortBy';
@@ -27,7 +26,7 @@ dayjs.extend(relativeTime);
2726
type Props = {
2827
durationPercent: number;
2928
isInDiffCohort: boolean;
30-
linkTo: LocationDescriptor;
29+
linkTo: React.ComponentProps<typeof Link>['to'];
3130
toggleComparison: (traceID: string) => void;
3231
trace: IOtelTrace;
3332
disableComparision: boolean;

0 commit comments

Comments
 (0)