Skip to content

Commit d27d0eb

Browse files
fixed syntax errors (#268)
* fixed syntax errors * fixed edit link and icon * fixed syntax error in show
1 parent 6c3b10a commit d27d0eb

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

templates/next/components/foo/Form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export const Form: FunctionComponent<Props> = ({ {{{lc}}} }) => {
3030
<div>
3131
<div>
3232
<Head>
33-
<title>{ {{{lc}}} ? `Edit {{{ucf}}} ${ {{{~lc}}}['@id']}` : `Create {{{ucf}}}` }</title>
34-
<meta property="og:title" content="{{{lc}}} ? `Edit {{{ucf}}} ${ {{{~lc}}}['@id']}` : `Create {{{ucf}}}`" />
33+
<title>{ {{{lc}}} ? `Edit {{{ucf}}} ${ {{~lc}}['@id']}` : `Create {{{ucf}}}` }</title>
34+
<meta property="og:title" content={ {{{lc}}} ? `Edit {{{ucf}}} ${ {{~lc}}['@id']}` : `Create {{{ucf}}}` } />
3535
</Head>
3636
</div>
37-
<h1>{{{lc}}} ? `Edit {{{ucf}}} ${ {{{~lc}}}['@id']}` : `Create {{{ucf}}}`</h1>
37+
<h1>{ {{{lc}}} ? `Edit {{{ucf}}} ${ {{~lc}}['@id']}` : `Create {{{ucf}}}` }</h1>
3838
<Formik
3939
initialValues={ {{~lc}} ? {...{{lc~}} } : new {{{ucf}}}()}
4040
validate={(values) => {

templates/next/components/foo/List.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,14 @@ export const List: FunctionComponent<Props> = ({ {{{name}}} }) => (
3838
<td>{{#if reference}}<ReferenceLinks items={ {{{../lc}}}['{{{name}}}'] } type="{{{reference.title}}}" />{{else}}{ {{{../lc}}}['{{{name}}}'] }{{/if}}</td>
3939
{{/each}}
4040
<td><ReferenceLinks items={ {{{lc}}}['@id'] } type="{{{lc}}}" useIcon={true} /></td>
41-
<br></br>
42-
<Link href={`${ {{~lc}}["@id"]}/edit`}>Edit</Link>
41+
<td>
42+
<Link href={`${ {{~lc}}["@id"]}/edit`}>
43+
<a>
44+
<i className="bi bi-pen" aria-hidden="true" />
45+
<span className="sr-only">Edit</span>
46+
</a>
47+
</Link>
48+
</td>
4349
</tr>
4450
))}
4551
</tbody>

templates/next/components/foo/Show.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export const Show: FunctionComponent<Props> = ({ {{{lc}}} }) => {
2727
};
2828

2929
return (
30-
<h1>
30+
<div>
3131
<div>
3232
<Head>
33-
<title>{`Show {{{ucf}}} ${ {{{~lc}}}['@id']}`}</title>
34-
<meta property="og:title" content=`Show {{{ucf}}} ${ {{{~lc}}}['@id']}` key="title" />
33+
<title>{`Show {{{ucf}}} ${ {{~lc}}['@id']}`}</title>
34+
<meta property="og:title" content={`Show {{{ucf}}} ${ {{~lc}}['@id']}`} key="title" />
3535
</Head>
3636
</div>
37-
<h1>{`Show {{{ucf}}} ${ {{{~lc}}}['@id']}`}</h1>
37+
<h1>{`Show {{{ucf}}} ${ {{~lc}}['@id']}`}</h1>
3838
<table className="table table-responsive table-striped table-hover">
3939
<thead>
4040
<tr>

0 commit comments

Comments
 (0)