From 52b4951507fa7052b057185c7915ac9317797f78 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Tue, 17 Mar 2026 14:16:45 +0100 Subject: [PATCH] Hide audit report buttons when no file attached When an audit has no report attached, neither the View nor Request access button should be displayed. Updated the conditional rendering to wrap the entire button section with the audit.report check instead of only checking it in the nested ternary. Signed-off-by: Bryan Frimin --- apps/trust/src/components/AuditRow.tsx | 46 ++++++++++++++------------ 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/apps/trust/src/components/AuditRow.tsx b/apps/trust/src/components/AuditRow.tsx index f3b64a7da..c5baacbd2 100644 --- a/apps/trust/src/components/AuditRow.tsx +++ b/apps/trust/src/components/AuditRow.tsx @@ -121,28 +121,30 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) { {audit.name ?? audit.framework.name} - {audit.report && audit.report.isUserAuthorized - ? ( - - ) - : ( - - )} + {audit.report && ( + audit.report.isUserAuthorized + ? ( + + ) + : ( + + ) + )} ); }