mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 00:11:14 -05:00
Add unit preferences to user settings
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
AlertTriangle
|
||||
} from 'lucide-react';
|
||||
import { ReviewsSection } from '@/components/reviews/ReviewsSection';
|
||||
import { MeasurementDisplay } from '@/components/ui/measurement-display';
|
||||
import { Ride } from '@/types/database';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
|
||||
@@ -206,8 +207,9 @@ export default function RideDetail() {
|
||||
<Card>
|
||||
<CardContent className="p-4 text-center">
|
||||
<Zap className="w-6 h-6 text-primary mx-auto mb-2" />
|
||||
<div className="text-2xl font-bold text-primary">{ride.max_speed_kmh}</div>
|
||||
<div className="text-sm text-muted-foreground">km/h</div>
|
||||
<div className="text-2xl font-bold text-primary">
|
||||
<MeasurementDisplay value={ride.max_speed_kmh} type="speed" />
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
@@ -216,8 +218,9 @@ export default function RideDetail() {
|
||||
<Card>
|
||||
<CardContent className="p-4 text-center">
|
||||
<TrendingUp className="w-6 h-6 text-accent mx-auto mb-2" />
|
||||
<div className="text-2xl font-bold text-accent">{ride.max_height_meters}</div>
|
||||
<div className="text-sm text-muted-foreground">meters</div>
|
||||
<div className="text-2xl font-bold text-accent">
|
||||
<MeasurementDisplay value={ride.max_height_meters} type="distance" />
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
@@ -226,8 +229,10 @@ export default function RideDetail() {
|
||||
<Card>
|
||||
<CardContent className="p-4 text-center">
|
||||
<Ruler className="w-6 h-6 text-secondary mx-auto mb-2" />
|
||||
<div className="text-2xl font-bold text-secondary">{Math.round(ride.length_meters)}</div>
|
||||
<div className="text-sm text-muted-foreground">meters long</div>
|
||||
<div className="text-2xl font-bold text-secondary">
|
||||
<MeasurementDisplay value={ride.length_meters} type="distance" />
|
||||
</div>
|
||||
<div className="text-sm text-muted-foreground">long</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
@@ -267,7 +272,9 @@ export default function RideDetail() {
|
||||
<Card>
|
||||
<CardContent className="p-4 text-center">
|
||||
<div className="text-2xl mb-2">⬇️</div>
|
||||
<div className="text-2xl font-bold text-destructive">{ride.drop_height_meters}m</div>
|
||||
<div className="text-2xl font-bold text-destructive">
|
||||
<MeasurementDisplay value={ride.drop_height_meters} type="distance" />
|
||||
</div>
|
||||
<div className="text-sm text-muted-foreground">drop</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -296,7 +303,7 @@ export default function RideDetail() {
|
||||
</h3>
|
||||
<div className="text-sm space-y-1">
|
||||
{ride.height_requirement && (
|
||||
<div>Minimum height: {ride.height_requirement}cm</div>
|
||||
<div>Minimum height: <MeasurementDisplay value={ride.height_requirement} type="height" /></div>
|
||||
)}
|
||||
{ride.age_requirement && (
|
||||
<div>Minimum age: {ride.age_requirement} years</div>
|
||||
|
||||
Reference in New Issue
Block a user