import { <%= inertia_model_type %> } from './types' interface <%= inertia_component_name %>Props { <%= singular_table_name %>: <%= inertia_model_type %> } export default function <%= inertia_component_name %>({ <%= singular_table_name %> }: <%= inertia_component_name %>Props) { return (
<%= attribute.human_name %>: <% if attribute.attachment? -%> {<%= singular_table_name %>.<%= attribute.column_name %> && ( .<%= attribute.column_name %>.url}>{<%= singular_table_name %>.<%= attribute.column_name %>.filename} )}
<% elsif attribute.attachments? -%> {<%= singular_table_name %>.<%= attribute.column_name %>.map((file, i) => ( ))} <% else -%> {<%= singular_table_name %>.<%= attribute.column_name %>?.toString()} <% end -%> <% end -%>