Restoring mattermost favicon on leave focalboard (#948)
This commit is contained in:
parent
2aac030ee7
commit
4dc1c6db4f
1 changed files with 15 additions and 0 deletions
|
@ -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 a new issue