import type {Organization} from 'sentry/types'; import type {VirtualizedViewManager} from 'sentry/views/performance/newTraceDetails/virtualizedViewManager'; import { isMissingInstrumentationNode, isNoDataNode, isParentAutogroupedNode, isSiblingAutogroupedNode, isSpanNode, isTraceErrorNode, isTransactionNode, } from '../../guards'; import type {TraceTree, TraceTreeNode} from '../../traceTree'; import {ErrorNodeDetails} from '../details/error'; import {MissingInstrumentationNodeDetails} from '../details/missingInstrumentation'; import {NoDataDetails} from '../details/noData'; import {ParentAutogroupNodeDetails} from '../details/parentAutogroup'; import {SiblingAutogroupNodeDetails} from '../details/siblingAutogroup'; import {SpanNodeDetails} from '../details/span'; import {TransactionNodeDetails} from '../details/transaction'; export interface TraceTreeNodeDetailsProps { manager: VirtualizedViewManager; node: T; onParentClick: (node: TraceTreeNode) => void; organization: Organization; scrollToNode: (node: T) => void; } export function TraceTreeNodeDetails(props: TraceTreeNodeDetailsProps) { if (isTransactionNode(props.node)) { return ; } if (isSpanNode(props.node)) { return ; } if (isTraceErrorNode(props.node)) { return ; } if (isParentAutogroupedNode(props.node)) { return ; } if (isSiblingAutogroupedNode(props.node)) { return ; } if (isMissingInstrumentationNode(props.node)) { return ; } if (isNoDataNode(props.node)) { return ; } throw new Error('Unknown clicked node type'); }