let nav: ((href: string) => void) | undefined export const setNavigate = (fn: (href: string) => void) => { nav = fn } export const handleNotificationClick = (href?: string) => { window.focus() if (!href) return if (nav) nav(href) else window.location.assign(href) }