Fix TypeScript build errors

This commit is contained in:
gpt-engineer-app[bot]
2025-10-12 16:22:57 +00:00
parent 5637b37ebc
commit dd079bd5a5
12 changed files with 52 additions and 140 deletions

View File

@@ -23,28 +23,6 @@ import { useNavigate } from 'react-router-dom';
type DesignerFormData = z.infer<typeof entitySchemas.designer>;
// Input type for the form (before transformation)
type DesignerFormInput = {
name: string;
slug: string;
description?: string;
person_type: 'company' | 'individual' | 'firm' | 'organization';
website_url?: string;
founded_year?: string;
headquarters_location?: string;
images?: {
uploaded: Array<{
url: string;
cloudflare_id?: string;
file?: any;
isLocal?: boolean;
caption?: string;
}>;
banner_assignment?: number | null;
card_assignment?: number | null;
};
};
interface DesignerFormProps {
onSubmit: (data: DesignerFormData) => void;
onCancel: () => void;
@@ -68,7 +46,7 @@ export function DesignerForm({ onSubmit, onCancel, initialData }: DesignerFormPr
setValue,
watch,
formState: { errors }
} = useForm<DesignerFormInput>({
} = useForm({
resolver: zodResolver(entitySchemas.designer),
defaultValues: {
name: initialData?.name || '',