From b09e145b7b1ccdacea7d8dc2e80faa3c7edfa61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Tue, 27 Feb 2024 17:32:50 +0100 Subject: [PATCH] Hide active grants section if empty --- .../nextjs/app/_components/ActiveGrants.tsx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/nextjs/app/_components/ActiveGrants.tsx b/packages/nextjs/app/_components/ActiveGrants.tsx index 7f67789..83902f5 100644 --- a/packages/nextjs/app/_components/ActiveGrants.tsx +++ b/packages/nextjs/app/_components/ActiveGrants.tsx @@ -20,35 +20,35 @@ const ActiveGrantRow = ({ title, askAmount, builder, approvedAt }: GrantData) => export const ActiveGrants = async () => { const activeGrants = await getAllActiveGrants(); + if (!activeGrants.length) { + return null; + } + return (

WIP grants

sparkle
- {activeGrants.length > 0 ? ( -
-
- - - - - - - - - - - {activeGrants.map(grant => ( - - ))} - -
TitleFundingBuilderDate
-
+
+
+ + + + + + + + + + + {activeGrants.map(grant => ( + + ))} + +
TitleFundingBuilderDate
- ) : ( -

No active grants

- )} +
); };