From 57f5648069ec4579c8c26dd170660d65508a054a Mon Sep 17 00:00:00 2001 From: Aditya <110272990+ADI-ROXX@users.noreply.github.com> Date: Sun, 26 Jan 2025 05:24:03 +0530 Subject: [PATCH] Remove defaultProps from Ticks.tsx (#2617) ## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] 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: cs-308-2023 --- .../components/TracePage/TraceTimelineViewer/Ticks.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/Ticks.tsx b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/Ticks.tsx index d6893be477..28eacbee5e 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/Ticks.tsx +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/Ticks.tsx @@ -26,9 +26,7 @@ type TicksProps = { startTime?: number | TNil; }; -export default function Ticks(props: TicksProps) { - const { endTime, numTicks, showLabels, startTime } = props; - +export default function Ticks({ endTime = null, numTicks, showLabels = null, startTime = null }: TicksProps) { let labels: undefined | string[]; if (showLabels) { labels = []; @@ -57,9 +55,3 @@ export default function Ticks(props: TicksProps) { } return
{ticks}
; } - -Ticks.defaultProps = { - endTime: null, - showLabels: null, - startTime: null, -};