Skip to content

Commit

Permalink
Reset document title on component unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
valtterikantanen committed Dec 16, 2024
1 parent 481b351 commit 83d4bd2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/frontend/src/common/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ export const useProgress = loading => {
export const useTitle = title => {
useEffect(() => {
document.title = title ? `${title} - Oodikone` : 'Oodikone'
return () => {
document.title = 'Oodikone'
}
}, [title])
}

Expand Down

0 comments on commit 83d4bd2

Please sign in to comment.