From 950ac676f0a00e2c3666e03b0a89cb9f806849be Mon Sep 17 00:00:00 2001 From: i701 Date: Sat, 20 Sep 2025 11:16:06 +0500 Subject: [PATCH] =?UTF-8?q?Show=20no=20agreements=20if=20there=20is=20no?= =?UTF-8?q?=20agreement=20in=20agreement=20page=20=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(dashboard)/agreements/page.tsx | 42 ++++++++++++++++------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/app/(dashboard)/agreements/page.tsx b/app/(dashboard)/agreements/page.tsx index c694a9a..e014aa9 100644 --- a/app/(dashboard)/agreements/page.tsx +++ b/app/(dashboard)/agreements/page.tsx @@ -3,23 +3,27 @@ import { AgreementCard } from "@/components/agreement-card"; import { tryCatch } from "@/utils/tryCatch"; export default async function Agreements() { - const [error, profile] = await tryCatch(getProfile()) - return ( -
-
-

Agreements

-
-
- {error ? ( -
- An error occurred while fetching agreements: {error.message} -
- ) : ( -
- -
- )} -
-
- ); + const [error, profile] = await tryCatch(getProfile()); + return ( +
+
+

Agreements

+
+
+ {error ? ( +
+ An error occurred while fetching agreements: {error.message} +
+ ) : ( +
+ {profile.agreement ? ( + + ) : ( +
No agreement found.
+ )} +
+ )} +
+
+ ); }