Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const NotificationIcon = (props: PropsIcon) => {
if (props.type === NOTIFICATION_KINDS_SIDE.error)
return ;
if (props.type === NOTIFICATION_KINDS_SIDE.info)
return ;
if (props.type === NOTIFICATION_KINDS_SIDE.warning)
return ;
return ;
};
NotificationIcon.displayName = 'NotificationIcon';
const getColorByType = (value: TAppNotificationKind) => {
switch (value) {
case NOTIFICATION_KINDS_SIDE.success:
return customProperties.colorPrimary;
case NOTIFICATION_KINDS_SIDE.info:
return customProperties.colorInfo;
case NOTIFICATION_KINDS_SIDE.error:
return customProperties.colorError;
case NOTIFICATION_KINDS_SIDE.warning:
return customProperties.colorWarning;
default:
return 'transparent';
}
};
if (CustomNotificationComponent) {
return (
{
dispatch(removeNotification(notification.id));
}}
/>
);
}
switch (notification.kind) {
case NOTIFICATION_KINDS_SIDE.error:
case NOTIFICATION_KINDS_SIDE.warning:
case NOTIFICATION_KINDS_SIDE.info:
case NOTIFICATION_KINDS_SIDE.success:
return (
{
dispatch(removeNotification(notification.id));
}}
/>
);
default:
return null;
}
})}