import { FunctionComponent } from "react"; import Link from "next/link"; import ReferenceLinks from "../common/ReferenceLinks"; import { getPath } from "../../utils/dataAccess"; import { {{{ucf}}} } from '../../types/{{{ucf}}}'; interface Props { {{{lc}}}s: {{{ucf}}}[]; } export const List: FunctionComponent = ({ {{{lc}}}s }) => (

{{{ucf}}} List

Create {{#each fields}} {{/each}} { {{{lc}}}s && ({{{lc}}}s.length !== 0) && {{{lc}}}s.map( ( {{{lc}}} ) => ( {{{lc}}}['@id'] && {{#each fields}} {{/each}} ))}
id{{name}}
{{#if isReferences}} ({ href: getPath(ref, '/{{{lowercase reference.title}}}s/[id]'), name: ref })) } /> {{else if reference}} {{else if isEmbeddeds}} ({ href: getPath(emb['@id'], '/{{{lowercase embedded.title}}}s/[id]'), name: emb['@id'] })) } /> {{else if embedded}} {{else if (compare type "==" "Date") }} { {{{../lc}}}['{{{name}}}']?.toLocaleString() } {{else}} { {{{../lc}}}['{{{name}}}'] } {{/if}} Show
);