Fix: Resolve type errors in Ride and Profile components

This commit is contained in:
gpt-engineer-app[bot]
2025-10-16 14:17:17 +00:00
parent bc4a444138
commit b84b40f05d
4 changed files with 104 additions and 37 deletions

View File

@@ -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,