blob: 1234cd1d6290d4fdfc8bd9c0f6a4d6a00fe20ac2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
type WindowTarget = {
focus: () => void
location: {
assign: (href: string) => void
}
}
export const handleNotificationClick = (href?: string, target: WindowTarget = window) => {
target.focus()
if (!href) return
target.location.assign(href)
}
|