import { CreateNotificationOptions , NotificationsContext , NotificationsContextValue } from '@proton/components' ; import { noop } from '@proton/shared/lib/helpers/function' ; interface NotificationsHijackProps { onCreate : ( options : CreateNotificationOptions ) => void ; } const NotificationsHijack = ( { children , onCreate } ) => { const hijackedCreateNotification = ( options ) => { onCreate ( options ) ; return 42 ; } ; const context = { createNotification : hijackedCreateNotification , removeNotification : noop , hideNotification : noop , clearNotifications : noop , } ; return < NotificationsContext . Provider value = { context } > { children } < /NotificationsContext.Provider>; } ; export default NotificationsHijack ;