mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 13:11:14 -05:00
Implement reviews system
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
Zap,
|
||||
Camera
|
||||
} from 'lucide-react';
|
||||
import { ReviewsSection } from '@/components/reviews/ReviewsSection';
|
||||
import { Park, Ride } from '@/types/database';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
|
||||
@@ -273,7 +274,11 @@ export default function ParkDetail() {
|
||||
<CardContent>
|
||||
<div className="grid md:grid-cols-2 gap-4">
|
||||
{rides.slice(0, 4).map((ride) => (
|
||||
<div key={ride.id} className="flex items-center gap-3 p-3 border rounded-lg">
|
||||
<div
|
||||
key={ride.id}
|
||||
className="flex items-center gap-3 p-3 border rounded-lg hover:bg-muted/50 cursor-pointer transition-colors"
|
||||
onClick={() => navigate(`/parks/${park.slug}/rides/${ride.slug}`)}
|
||||
>
|
||||
<div className="text-2xl">{getRideIcon(ride.category)}</div>
|
||||
<div className="flex-1">
|
||||
<h4 className="font-medium">{ride.name}</h4>
|
||||
@@ -375,7 +380,11 @@ export default function ParkDetail() {
|
||||
<TabsContent value="rides" className="mt-6">
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{rides.map((ride) => (
|
||||
<Card key={ride.id} className="hover:shadow-lg transition-shadow cursor-pointer">
|
||||
<Card
|
||||
key={ride.id}
|
||||
className="hover:shadow-lg transition-shadow cursor-pointer"
|
||||
onClick={() => navigate(`/parks/${park.slug}/rides/${ride.slug}`)}
|
||||
>
|
||||
<CardContent className="p-4">
|
||||
<div className="flex items-start gap-3 mb-3">
|
||||
<div className="text-2xl">{getRideIcon(ride.category)}</div>
|
||||
@@ -423,13 +432,13 @@ export default function ParkDetail() {
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="reviews" className="mt-6">
|
||||
<div className="text-center py-12">
|
||||
<Star className="w-16 h-16 text-muted-foreground mx-auto mb-4" />
|
||||
<h3 className="text-xl font-semibold mb-2">Reviews Coming Soon</h3>
|
||||
<p className="text-muted-foreground">
|
||||
User reviews and ratings will be available soon
|
||||
</p>
|
||||
</div>
|
||||
<ReviewsSection
|
||||
entityType="park"
|
||||
entityId={park.id}
|
||||
entityName={park.name}
|
||||
averageRating={park.average_rating}
|
||||
reviewCount={park.review_count}
|
||||
/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="photos" className="mt-6">
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
Heart,
|
||||
AlertTriangle
|
||||
} from 'lucide-react';
|
||||
import { ReviewsSection } from '@/components/reviews/ReviewsSection';
|
||||
import { Ride } from '@/types/database';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
|
||||
@@ -462,13 +463,13 @@ export default function RideDetail() {
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="reviews" className="mt-6">
|
||||
<div className="text-center py-12">
|
||||
<Star className="w-16 h-16 text-muted-foreground mx-auto mb-4" />
|
||||
<h3 className="text-xl font-semibold mb-2">Reviews Coming Soon</h3>
|
||||
<p className="text-muted-foreground">
|
||||
User reviews and ratings will be available soon
|
||||
</p>
|
||||
</div>
|
||||
<ReviewsSection
|
||||
entityType="ride"
|
||||
entityId={ride.id}
|
||||
entityName={ride.name}
|
||||
averageRating={ride.average_rating}
|
||||
reviewCount={ride.review_count}
|
||||
/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="photos" className="mt-6">
|
||||
|
||||
Reference in New Issue
Block a user