mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 22:31:14 -05:00
Refactor code to address issues
This commit is contained in:
@@ -16,6 +16,7 @@ import { useAuth } from '@/hooks/useAuth';
|
||||
import { toast } from '@/hooks/use-toast';
|
||||
import { useAuthModal } from '@/hooks/useAuthModal';
|
||||
import { useDocumentTitle } from '@/hooks/useDocumentTitle';
|
||||
import { useOpenGraph } from '@/hooks/useOpenGraph';
|
||||
|
||||
export default function ManufacturerRides() {
|
||||
const { manufacturerSlug } = useParams<{ manufacturerSlug: string }>();
|
||||
@@ -104,6 +105,17 @@ export default function ManufacturerRides() {
|
||||
ride.park?.name?.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
);
|
||||
|
||||
useOpenGraph({
|
||||
title: manufacturer ? `${manufacturer.name} - Rides` : 'Manufacturer Rides',
|
||||
description: manufacturer
|
||||
? `Explore ${filteredRides.length} rides manufactured by ${manufacturer.name}`
|
||||
: undefined,
|
||||
imageUrl: manufacturer?.banner_image_url || filteredRides[0]?.banner_image_url,
|
||||
imageId: manufacturer?.banner_image_id || filteredRides[0]?.banner_image_id,
|
||||
type: 'website',
|
||||
enabled: !!manufacturer && !loading
|
||||
});
|
||||
|
||||
const handleCreateSubmit = async (data: any) => {
|
||||
try {
|
||||
if (!manufacturer) {
|
||||
|
||||
Reference in New Issue
Block a user