import { Head, Link } from '@inertiajs/react' import Form from './Form' import { <%= inertia_model_type %> } from './types' interface NewProps { <%= singular_table_name %>: <%= inertia_model_type %> } export default function New({ <%= singular_table_name %> }: NewProps) { return ( <>

New <%= human_name.downcase %>

={<%= singular_table_name %>} onSubmit={(form) => { form.transform((data) => ({ <%= singular_table_name %>: data })) form.post('<%= js_resources_path %>') }} submitText="Create <%= human_name %>" /> Back to <%= human_name.pluralize.downcase %>
) }