debian-mirror-gitlab/app/assets/javascripts/issues/show/components/incidents/utils.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
443 B
JavaScript
Raw Normal View History

2022-07-23 23:45:48 +05:30
import { createAlert } from '~/flash';
import { s__ } from '~/locale';
export const displayAndLogError = (error) =>
createAlert({
message: s__('Incident|Something went wrong while fetching incident timeline events.'),
captureError: true,
error,
});
const EVENT_ICONS = {
comment: 'comment',
default: 'comment',
};
export const getEventIcon = (actionName) => {
return EVENT_ICONS[actionName] ?? EVENT_ICONS.default;
};