mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 22:31:13 -05:00
Fix: Resolve type errors in Ride and Profile components
This commit is contained in:
@@ -3,6 +3,7 @@ import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import * as z from 'zod';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import type { RideModelTechnicalSpec } from '@/types/database';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { Label } from '@/components/ui/label';
|
||||
@@ -65,7 +66,14 @@ export function RideModelForm({
|
||||
initialData
|
||||
}: RideModelFormProps) {
|
||||
const { isModerator } = useUserRole();
|
||||
const [technicalSpecs, setTechnicalSpecs] = useState<RideModelTechnicalSpec[]>([]);
|
||||
const [technicalSpecs, setTechnicalSpecs] = useState<{
|
||||
spec_name: string;
|
||||
spec_value: string;
|
||||
spec_type: 'string' | 'number' | 'boolean' | 'date';
|
||||
category?: string;
|
||||
unit?: string;
|
||||
display_order: number;
|
||||
}[]>([]);
|
||||
|
||||
const {
|
||||
register,
|
||||
|
||||
Reference in New Issue
Block a user