mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 18:25:51 +01:00
feat(website): adjust page title
This commit is contained in:
11
apps/website/src/hooks.tsx
Normal file
11
apps/website/src/hooks.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useEffect } from "preact/hooks";
|
||||
|
||||
export function usePageTitle(title: string) {
|
||||
useEffect(() => {
|
||||
if (title.length) {
|
||||
document.title = `${title} - Trilium Notes`;
|
||||
} else {
|
||||
document.title = "Trilium Notes";
|
||||
}
|
||||
}, [ title ]);
|
||||
}
|
||||
Reference in New Issue
Block a user