mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 21:31:14 -05:00
feat: Implement dynamic OG images
This commit is contained in:
@@ -25,6 +25,7 @@ import { EntityHistoryTabs } from '@/components/history/EntityHistoryTabs';
|
||||
import { trackPageView } from '@/lib/viewTracking';
|
||||
import { useAuthModal } from '@/hooks/useAuthModal';
|
||||
import { useDocumentTitle } from '@/hooks/useDocumentTitle';
|
||||
import { useOpenGraph } from '@/hooks/useOpenGraph';
|
||||
|
||||
export default function DesignerDetail() {
|
||||
const { slug } = useParams<{ slug: string }>();
|
||||
@@ -41,6 +42,16 @@ export default function DesignerDetail() {
|
||||
|
||||
// Update document title when designer changes
|
||||
useDocumentTitle(designer?.name || 'Designer Details');
|
||||
|
||||
// Update Open Graph meta tags
|
||||
useOpenGraph({
|
||||
title: designer?.name || '',
|
||||
description: designer?.description || (designer ? `${designer.name} - Ride Designer${designer.headquarters_location ? ` based in ${designer.headquarters_location}` : ''}` : ''),
|
||||
imageUrl: designer?.banner_image_url,
|
||||
imageId: designer?.banner_image_id,
|
||||
type: 'profile',
|
||||
enabled: !!designer
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (slug) {
|
||||
|
||||
Reference in New Issue
Block a user