mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 02:51:13 -05:00
feat: Implement dynamic OG images
This commit is contained in:
@@ -26,6 +26,7 @@ import { VersionIndicator } from '@/components/versioning/VersionIndicator';
|
||||
import { EntityHistoryTabs } from '@/components/history/EntityHistoryTabs';
|
||||
import { useAuthModal } from '@/hooks/useAuthModal';
|
||||
import { useDocumentTitle } from '@/hooks/useDocumentTitle';
|
||||
import { useOpenGraph } from '@/hooks/useOpenGraph';
|
||||
|
||||
export default function PropertyOwnerDetail() {
|
||||
const { slug } = useParams<{ slug: string }>();
|
||||
@@ -45,6 +46,16 @@ export default function PropertyOwnerDetail() {
|
||||
|
||||
// Update document title when owner changes
|
||||
useDocumentTitle(owner?.name || 'Property Owner Details');
|
||||
|
||||
// Update Open Graph meta tags
|
||||
useOpenGraph({
|
||||
title: owner?.name || '',
|
||||
description: owner?.description || (owner ? `${owner.name} - Property Owner${owner.headquarters_location ? ` based in ${owner.headquarters_location}` : ''}` : ''),
|
||||
imageUrl: owner?.banner_image_url,
|
||||
imageId: owner?.banner_image_id,
|
||||
type: 'profile',
|
||||
enabled: !!owner
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (slug) {
|
||||
|
||||
Reference in New Issue
Block a user