mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-26 12:47:00 -05:00
Implement dynamic page titles
This commit is contained in:
@@ -11,6 +11,7 @@ import { getCloudflareImageUrl } from '@/lib/cloudflareImageUtils';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
import { Header } from '@/components/layout/Header';
|
||||
import { Footer } from '@/components/layout/Footer';
|
||||
import { useDocumentTitle } from '@/hooks/useDocumentTitle';
|
||||
|
||||
export default function BlogPost() {
|
||||
const { slug } = useParams<{ slug: string }>();
|
||||
@@ -31,6 +32,9 @@ export default function BlogPost() {
|
||||
},
|
||||
enabled: !!slug,
|
||||
});
|
||||
|
||||
// Update document title when post changes
|
||||
useDocumentTitle(post?.title || 'Blog Post');
|
||||
|
||||
useEffect(() => {
|
||||
if (slug) {
|
||||
|
||||
Reference in New Issue
Block a user