/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/app/src/utils/notification-click.ts
13 строк
384 B
Brendan Allan
app: prefer using useLocation instead of window.location (#15989)
05 мар 2026, 09:41
Не верифицирован
05 мар 2026, 09:41
7948de1
Код
Авторство
О чём код?
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) return nav(href) console.warn("notification-click: navigate function not set, falling back to window.location.assign") window.location.assign(href) }