Implement dynamic page titles

This commit is contained in:
gpt-engineer-app[bot]
2025-10-29 12:42:18 +00:00
parent 1cdd1f59fb
commit 2d66a4f778
43 changed files with 131 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
import { useEffect } from 'react';
export function useDocumentTitle(title: string, suffix: string = 'ThrillWiki') {
useEffect(() => {
const fullTitle = title ? `${title} | ${suffix}` : suffix;
document.title = fullTitle;
return () => {
document.title = suffix;
};
}, [title, suffix]);
}