Sha256: 53e769063e3e633eed8e6a5568e77658ffed2f41c34bddecf87ea74bb45c1cfb
Contents?: true
Size: 889 Bytes
Versions: 6
Compression:
Stored size: 889 Bytes
Contents
import { Link, Head } 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
6 entries across 6 versions & 1 rubygems