Sha256: f43f96caa82c3bdbd154cab7f1356d263d531c3690152d2a1cf5c5aa5b08af51
Contents?: true
Size: 889 Bytes
Versions: 1
Compression:
Stored size: 889 Bytes
Contents
import { Head, Link } from '@inertiajs/react' import <%= inertia_component_name %> from './<%= inertia_component_name %>' export default function Index({ <%= plural_table_name %>, flash }) { return ( <> <Head title="<%= human_name.pluralize %>" /> {flash.notice && <p style={{ color: 'green' }}>{flash.notice}</p>} <h1><%= human_name.pluralize %></h1> <div> {<%= plural_table_name %>.map((<%= singular_table_name %>) => ( <div key={<%= singular_table_name %>.id}> <<%= inertia_component_name %> <%= singular_table_name %>={<%= singular_table_name %>} /> <p> <Link href={`<%= js_resource_path %>`}>Show this <%= human_name.downcase %></Link> </p> </div> ))} </div> <Link href="<%= js_new_resource_path %>">New <%= human_name.downcase %></Link> </> ) }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inertia_rails-3.5.0 | lib/generators/inertia_templates/scaffold/templates/react/Index.jsx.tt |