mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
61 lines
1.5 KiB
TypeScript
61 lines
1.5 KiB
TypeScript
import ErrorBoundary from 'sentry/components/errorBoundary';
|
|
import type {ExceptionType, Group, Project} from 'sentry/types';
|
|
import type {Event} from 'sentry/types/event';
|
|
import type {StackType} from 'sentry/types/stacktrace';
|
|
import {StackView} from 'sentry/types/stacktrace';
|
|
|
|
import {Content} from './content';
|
|
import RawContent from './rawContent';
|
|
|
|
type Props = {
|
|
event: Event;
|
|
hasHierarchicalGrouping: boolean;
|
|
newestFirst: boolean;
|
|
projectSlug: Project['slug'];
|
|
stackType: StackType;
|
|
groupingCurrentLevel?: Group['metadata']['current_level'];
|
|
meta?: Record<any, any>;
|
|
stackView?: StackView;
|
|
threadId?: number;
|
|
} & Pick<ExceptionType, 'values'>;
|
|
|
|
export function ExceptionContent({
|
|
stackView,
|
|
stackType,
|
|
projectSlug,
|
|
values,
|
|
event,
|
|
newestFirst,
|
|
hasHierarchicalGrouping,
|
|
groupingCurrentLevel,
|
|
meta,
|
|
threadId,
|
|
}: Props) {
|
|
return (
|
|
<ErrorBoundary mini>
|
|
{stackView === StackView.RAW ? (
|
|
<RawContent
|
|
eventId={event.id}
|
|
projectSlug={projectSlug}
|
|
type={stackType}
|
|
values={values}
|
|
platform={event.platform}
|
|
/>
|
|
) : (
|
|
<Content
|
|
type={stackType}
|
|
stackView={stackView}
|
|
values={values}
|
|
projectSlug={projectSlug}
|
|
newestFirst={newestFirst}
|
|
event={event}
|
|
hasHierarchicalGrouping={hasHierarchicalGrouping}
|
|
groupingCurrentLevel={groupingCurrentLevel}
|
|
meta={meta}
|
|
threadId={threadId}
|
|
/>
|
|
)}
|
|
</ErrorBoundary>
|
|
);
|
|
}
|