mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
Restoring mattermost favicon on leave focalboard (#948)
This commit is contained in:
parent
2aac030ee7
commit
4dc1c6db4f
@ -55,6 +55,21 @@ const MainApp = () => {
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const link = (document.querySelector("link[rel*='icon']") || document.createElement('link')) as HTMLLinkElement
|
||||
const restoreData = {
|
||||
type: link.type,
|
||||
rel: link.rel,
|
||||
href: link.href,
|
||||
}
|
||||
return () => {
|
||||
link.type = restoreData.type
|
||||
link.rel = restoreData.rel
|
||||
link.href = restoreData.href
|
||||
document.getElementsByTagName('head')[0].appendChild(link)
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<ReduxProvider store={store}>
|
||||
|
Loading…
Reference in New Issue
Block a user