From 2506324cfd583ffe63869e578aac53ce84b0773a Mon Sep 17 00:00:00 2001 From: kjuulh Date: Thu, 18 Nov 2021 23:20:44 +0100 Subject: [PATCH] Remove unused sections --- src/client/src/pages/index.tsx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/client/src/pages/index.tsx b/src/client/src/pages/index.tsx index 2d981c7..7d8e05f 100644 --- a/src/client/src/pages/index.tsx +++ b/src/client/src/pages/index.tsx @@ -31,17 +31,21 @@ const HomePage = () => { )} {sections && - sections.map((section) => ( -
- - -
- ))} + sections.map( + (section) => + groupedTodos[section].filter((t) => t.status !== true).length !== + 0 && ( +
+ + +
+ ) + )} {data && data.length === 0 && (