import {AnnotatedText} from 'sentry/components/events/meta/annotatedText'; import type {getMeta} from 'sentry/components/events/meta/metaProxy'; import {t} from 'sentry/locale'; import type {Frame} from 'sentry/types'; type Props = { frame: Frame; className?: string; hasHiddenDetails?: boolean; meta?: Record; showCompleteFunctionName?: boolean; }; export function FunctionName({ frame, showCompleteFunctionName, hasHiddenDetails, className, meta, ...props }: Props) { const getValueOutput = (): | {meta: ReturnType; value: Frame['function']} | undefined => { if (hasHiddenDetails && showCompleteFunctionName && frame.rawFunction) { return { value: frame.rawFunction, meta: meta?.rawFunction?.[''], }; } if (frame.function) { return { value: frame.function, meta: meta?.function?.[''], }; } if (frame.rawFunction) { return { value: frame.rawFunction, meta: meta?.rawFunction?.[''], }; } return undefined; }; const valueOutput = getValueOutput(); return ( {!valueOutput ? ( t('') ) : ( )} ); }