mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-11 03:08:41 +00:00
app: prefer using useLocation instead of window.location (#15989)
This commit is contained in:
@@ -7,6 +7,7 @@ export const setNavigate = (fn: (href: string) => void) => {
|
||||
export const handleNotificationClick = (href?: string) => {
|
||||
window.focus()
|
||||
if (!href) return
|
||||
if (nav) nav(href)
|
||||
else window.location.assign(href)
|
||||
if (nav) return nav(href)
|
||||
console.warn("notification-click: navigate function not set, falling back to window.location.assign")
|
||||
window.location.assign(href)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user