From 400320661fff6b6dff04a5dde17bde33f612ac69 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 20 Sep 2020 15:42:43 -0500 Subject: [PATCH] =?UTF-8?q?refactor(web):=20=F0=9F=92=84=20tighten=20up=20?= =?UTF-8?q?footer=20to=20fit=20more=20rows=20on=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #1798 --- web/src/App.tsx | 6 +++++- web/src/hooks/useTablePageSizer.tsx | 5 ++++- web/src/index.css | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 702367c8d..000d6fdf2 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -22,7 +22,11 @@ const { Header, Content, Footer } = Layout; export const App: React.FC = () => ( - +
diff --git a/web/src/hooks/useTablePageSizer.tsx b/web/src/hooks/useTablePageSizer.tsx index eee29d7d5..feb12cdd4 100644 --- a/web/src/hooks/useTablePageSizer.tsx +++ b/web/src/hooks/useTablePageSizer.tsx @@ -17,7 +17,10 @@ export const useTablePageSizer = () => { }; const calculateSize = () => ({ - pageSize: Math.floor((window.innerHeight - 184) / 57), + pageSize: + window.innerWidth < 576 + ? Math.floor((window.innerHeight - 215) / 43) + : Math.floor((window.innerHeight - 150) / 57), isNarrowWindow: window.innerWidth < 576 ? true : false, isWideWindow: window.innerWidth > 1918 ? true : false, }); diff --git a/web/src/index.css b/web/src/index.css index 4a1df4db7..14687dfbd 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -11,3 +11,7 @@ code { font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; } + +body > #root > section { + height: 100vh; +}