@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
11 lines (9 loc) • 327 B
text/typescript
import { INotification } from '@magicbell/react-headless';
/**
* Function that opens the `actionUrl` of a notification in the same window.
*
* @param notification The notification
*/
export function openActionUrl(notification: INotification) {
if (notification.actionUrl) window.open(notification.actionUrl, '_self');
}