mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
31 lines
574 B
TypeScript
31 lines
574 B
TypeScript
import {t} from 'sentry/locale';
|
|
|
|
import type {EventExtraData} from './types';
|
|
import {EventExtraDataType} from './types';
|
|
|
|
type Output = {
|
|
subject: string;
|
|
value?: React.ReactNode;
|
|
};
|
|
|
|
export function getEventExtraDataKnownDataDetails({
|
|
data,
|
|
type,
|
|
}: {
|
|
data: EventExtraData;
|
|
type: EventExtraDataType;
|
|
}): Output {
|
|
switch (type) {
|
|
case EventExtraDataType.CRASHED_PROCESS:
|
|
return {
|
|
subject: t('Crashed Process'),
|
|
value: data[type],
|
|
};
|
|
default:
|
|
return {
|
|
subject: type,
|
|
value: data[type],
|
|
};
|
|
}
|
|
}
|