security hardening, team invites, granular locking, view counts, board subscriptions, scheduled changelog, mentions, recovery codes, accessibility and hover states
This commit is contained in:
11
packages/web/src/hooks/useDocumentTitle.ts
Normal file
11
packages/web/src/hooks/useDocumentTitle.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useEffect } from 'react'
|
||||
import { useBranding } from './useBranding'
|
||||
|
||||
export function useDocumentTitle(title?: string) {
|
||||
const { appName } = useBranding()
|
||||
|
||||
useEffect(() => {
|
||||
document.title = title ? `${title} - ${appName}` : appName
|
||||
return () => { document.title = appName }
|
||||
}, [title, appName])
|
||||
}
|
||||
Reference in New Issue
Block a user