From ea8cd21bb197e4b81733d0b4edd8a03fe99b8a10 Mon Sep 17 00:00:00 2001 From: Gabriel Borges Date: Thu, 23 May 2024 21:28:52 -0300 Subject: [PATCH] feat: define a height limit for tables --- frontend/src/pages/Authors/Authors.tsx | 76 ++++++++++++++------------ frontend/src/pages/Books/Books.tsx | 67 ++++++++++++----------- 2 files changed, 75 insertions(+), 68 deletions(-) diff --git a/frontend/src/pages/Authors/Authors.tsx b/frontend/src/pages/Authors/Authors.tsx index 7990143..347de94 100644 --- a/frontend/src/pages/Authors/Authors.tsx +++ b/frontend/src/pages/Authors/Authors.tsx @@ -38,45 +38,49 @@ const Authors: React.FC = () => {
- - - +
+
+ + - - - - - - - {authors?.length > 0 && authors.map(({ name, nationality, birthDate, email, id }: Author) => ( - shouldFilterInWith(name, nationality, birthDate, email, id) - && ( - - + + + - - - - ) - ))} -
- Author - - Nationality - - Birth date - - E-mail -
- {name} + + Author + + Nationality + + Birth date + + E-mail - {nationality} - - {birthDate} - - {email} -
- + + + {authors?.length > 0 && authors.map(({ name, nationality, birthDate, email, id }: Author) => ( + shouldFilterInWith(name, nationality, birthDate, email, id) + && ( + + + {name} + + + {nationality} + + + {birthDate} + + + {email} + + + ) + ))} + + + + ); }; diff --git a/frontend/src/pages/Books/Books.tsx b/frontend/src/pages/Books/Books.tsx index ca2f8e5..a90b069 100644 --- a/frontend/src/pages/Books/Books.tsx +++ b/frontend/src/pages/Books/Books.tsx @@ -41,41 +41,44 @@ const Books: React.FC = () => {
- - - +
+
+ + - - - - - - {books?.length > 0 && books.map(({ id, title, pages, authorsNames }: Book) => ( - shouldFilterInWith(title, pages, id, authorsNames) - && ( - - + + - - - ) - ))} -
- Book title - - Pages - - Authors -
- {title} + + Book title + + Pages + + Authors - {Number.isInteger(pages) ? `${pages} pages` : "Not informed"} - - { - {authorsNames} - } -
- + + + {books?.length > 0 && books.map(({ id, title, pages, authorsNames }: Book) => ( + shouldFilterInWith(title, pages, id, authorsNames) && ( + + + {title} + + + {Number.isInteger(pages) ? `${pages} pages` : "Not informed"} + + + { + {authorsNames} + } + + + ) + ))} + + + + ); };