From 2418612507bb8171f4d452ba18542dc13a938621 Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Sat, 26 Aug 2023 13:18:12 +0530 Subject: [PATCH] chore: updated documents page Signed-off-by: Adithya Krishna --- .../src/app/(dashboard)/documents/page.tsx | 44 +++++++------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/apps/web/src/app/(dashboard)/documents/page.tsx b/apps/web/src/app/(dashboard)/documents/page.tsx index 834483757..8ac33be51 100644 --- a/apps/web/src/app/(dashboard)/documents/page.tsx +++ b/apps/web/src/app/(dashboard)/documents/page.tsx @@ -64,6 +64,12 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage return `/documents?${params.toString()}`; }; + const documentStatuses = [ + InternalDocumentStatus.PENDING, + InternalDocumentStatus.COMPLETED, + InternalDocumentStatus.DRAFT, + ]; + return (
@@ -73,35 +79,17 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
- - - + {documentStatuses.map((status) => ( + + + - - {Math.min(stats.PENDING, 99)} - - - - - - - - - - {Math.min(stats.COMPLETED, 99)} - - - - - - - - - - {Math.min(stats.DRAFT, 99)} - - - + + {Math.min(stats[status], 99)} + + + + ))} All