Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getStatus = () => {
switch (type) {
case 'error':
return NotificationStatus.ERROR;
case 'warning':
return NotificationStatus.WARNING;
case 'success':
return NotificationStatus.SUCCESS;
default:
return NotificationStatus.NOTICE;
}
};
success(message: string) {
notificationState.addNotification({
message,
status: NotificationStatus.SUCCESS,
});
},
warning(message: string) {