Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function convertTypeToStatus(
type: NotificationType
): NotificationStatus {
switch (type) {
case 'notice':
return NotificationStatus.NOTICE;
case 'warning':
return NotificationStatus.WARNING;
case 'error':
return NotificationStatus.ERROR;
case 'success':
return NotificationStatus.SUCCESS;
default:
return NotificationStatus.NOTICE;
}
}
routeDebugger(
`Sending '${location.pathname + location.search}' to analytics.`
);
if (!DNT) {
trackPageview();
}
}
return null;
}}
/>
<content>
</content>
export function showContainerError({ props }) {
if (props.unrecoverable) {
notificationState.addNotification({
title: `Container Error`,
message: props.error,
status: NotificationStatus.ERROR,
});
} else {
notificationState.addNotification({
title: `Container Warning`,
message: props.error,
status: NotificationStatus.WARNING,
});
}
}