Files
2024-02-15 17:01:50 +00:00

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)} />;
}