Skip to content

Commit

Permalink
ref(trace): bad ref
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Sep 23, 2024
1 parent f12cd91 commit 19e0876
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions static/app/views/performance/newTraceDetails/trace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
type VirtualizedRow,
} from 'sentry/views/performance/newTraceDetails/traceRenderers/traceVirtualizedList';
import type {VirtualizedViewManager} from 'sentry/views/performance/newTraceDetails/traceRenderers/virtualizedViewManager';
import {TraceAutogroupedRow} from 'sentry/views/performance/newTraceDetails/traceRow/traceAutogroupedRow';
import {TraceErrorRow} from 'sentry/views/performance/newTraceDetails/traceRow/traceErrorRow';
import {TraceLoadingRow} from 'sentry/views/performance/newTraceDetails/traceRow/traceLoadingRow';
import {TraceMissingInstrumentationRow} from 'sentry/views/performance/newTraceDetails/traceRow/traceMissingInstrumentationRow';
Expand All @@ -53,6 +54,7 @@ import {
import {TraceTree, type TraceTreeNode} from './traceModels/traceTree';
import {useTraceState, useTraceStateDispatch} from './traceState/traceStateProvider';
import {
isAutogroupedNode,
isMissingInstrumentationNode,
isSpanNode,
isTraceErrorNode,
Expand Down Expand Up @@ -600,7 +602,7 @@ function RenderTraceRow(props: {

const onRowKeyDownProp = props.onRowKeyDown;
const onRowKeyDown = useCallback(
event => onRowKeyDownProp(event, props.index, node),
(event: React.KeyboardEvent) => onRowKeyDownProp(event, props.index, node),
[props.index, node, onRowKeyDownProp]
);

Expand Down Expand Up @@ -630,7 +632,7 @@ function RenderTraceRow(props: {
[node, onExpandProp]
);

const onZoomInProp = props.onExpand;
const onZoomInProp = props.onZoomIn;
const onZoomIn = useCallback(
(e: React.MouseEvent) => {
onZoomInProp(e, node, !node.zoomedIn);
Expand Down Expand Up @@ -694,6 +696,10 @@ function RenderTraceRow(props: {
return <TraceMissingInstrumentationRow {...rowProps} node={node} />;
}

if (isAutogroupedNode(node)) {
return <TraceAutogroupedRow {...rowProps} node={node} />;
}

if (isTraceErrorNode(node)) {
return <TraceErrorRow {...rowProps} node={node} />;
}
Expand Down

0 comments on commit 19e0876

Please sign in to comment.