From fb5c276a93e31abc58c8f031a2c4e010602297bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 21 Dec 2022 16:03:19 +0100 Subject: [PATCH] feat: add support for Next 13 (#352) --- .../next/components/common/Pagination.tsx | 68 +++++++++---------- .../next/components/common/ReferenceLinks.tsx | 9 +-- templates/next/components/foo/Form.tsx | 9 +-- templates/next/components/foo/List.tsx | 33 +++++---- templates/next/components/foo/Show.tsx | 18 ++--- 5 files changed, 70 insertions(+), 67 deletions(-) diff --git a/templates/next/components/common/Pagination.tsx b/templates/next/components/common/Pagination.tsx index 211f1e60..8fa7ffd5 100644 --- a/templates/next/components/common/Pagination.tsx +++ b/templates/next/components/common/Pagination.tsx @@ -22,45 +22,41 @@ const Pagination = ({ collection }: Props) => { className="text-xs font-bold inline-flex mx-auto divide-x-2 divide-gray-200 flex-row flex-wrap items-center justify-center mb-4 border-2 border-gray-200 rounded-2xl overflow-hidden" aria-label="Page navigation" > - - - First - + + First - - - Previous - + + Previous - - - Next - + + Next - - - Last - + + Last diff --git a/templates/next/components/common/ReferenceLinks.tsx b/templates/next/components/common/ReferenceLinks.tsx index e4c28891..e47d1e88 100644 --- a/templates/next/components/common/ReferenceLinks.tsx +++ b/templates/next/components/common/ReferenceLinks.tsx @@ -19,10 +19,11 @@ const ReferenceLinks: FunctionComponent = ({ items }) => { } return ( - - - {typeof items === "string" ? items : items.name} - + + {typeof items === "string" ? items : items.name} ); }; diff --git a/templates/next/components/foo/Form.tsx b/templates/next/components/foo/Form.tsx index 6bd0b84e..3612d618 100644 --- a/templates/next/components/foo/Form.tsx +++ b/templates/next/components/foo/Form.tsx @@ -51,10 +51,11 @@ export const Form: FunctionComponent = ({ {{{lc}}} }) => { return (
- - - {`< Back to list`} - + + {`< Back to list`}

{ {{{lc}}} ? `Edit {{{ucf}}} ${ {{~lc}}['@id']}` : `Create {{{ucf}}}` } diff --git a/templates/next/components/foo/List.tsx b/templates/next/components/foo/List.tsx index 4eceda1d..89a1fdbb 100644 --- a/templates/next/components/foo/List.tsx +++ b/templates/next/components/foo/List.tsx @@ -13,10 +13,11 @@ export const List: FunctionComponent = ({ {{{lc}}}s }) => (

{{{ucf}}} List

- - - Create - + + Create
@@ -54,25 +55,27 @@ export const List: FunctionComponent = ({ {{{lc}}}s }) => ( {{/each}} diff --git a/templates/next/components/foo/Show.tsx b/templates/next/components/foo/Show.tsx index 1632949e..49f1afd1 100644 --- a/templates/next/components/foo/Show.tsx +++ b/templates/next/components/foo/Show.tsx @@ -35,10 +35,11 @@ export const Show: FunctionComponent = ({ {{{lc}}}, text }) => { {`Show {{{ucf}}} ${ {{~lc}}['@id']}`}
- - + Show - - - - Edit - - - - - + + Edit + + + +