mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
23 lines
544 B
TypeScript
23 lines
544 B
TypeScript
import ContextBlock from 'sentry/components/events/contexts/contextBlock';
|
|
import type {Event} from 'sentry/types/event';
|
|
|
|
type Props = {
|
|
alias: string;
|
|
data: Record<string, React.ReactNode | undefined>;
|
|
event: Event;
|
|
};
|
|
|
|
function getKnownData(data: Props['data']) {
|
|
return Object.entries(data)
|
|
.filter(([k]) => k !== 'type' && k !== 'title')
|
|
.map(([key, value]) => ({
|
|
key,
|
|
subject: key,
|
|
value,
|
|
}));
|
|
}
|
|
|
|
export function DefaultContext({data}: Props) {
|
|
return <ContextBlock data={getKnownData(data)} />;
|
|
}
|