Skip to content

Commit a2cc1b8

Browse files
authored
fix: display premium banner on audit page when license inactive (coder#16713)
Fixes: coder#14798
1 parent c5a265f commit a2cc1b8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

site/src/pages/AuditPage/AuditPage.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ import { AuditPageView } from "./AuditPageView";
1616

1717
const AuditPage: FC = () => {
1818
const feats = useFeatureVisibility();
19+
// The "else false" is required if audit_log is undefined.
20+
// It may happen if owner removes the license.
21+
//
22+
// see: https://github.com/coder/coder/issues/14798
23+
const isAuditLogVisible = feats.audit_log || false;
24+
1925
const { showOrganizations } = useDashboard();
2026

2127
/**
@@ -85,7 +91,7 @@ const AuditPage: FC = () => {
8591
<AuditPageView
8692
auditLogs={auditsQuery.data?.audit_logs}
8793
isNonInitialPage={isNonInitialPage(searchParams)}
88-
isAuditLogVisible={feats.audit_log}
94+
isAuditLogVisible={isAuditLogVisible}
8995
auditsQuery={auditsQuery}
9096
error={auditsQuery.error}
9197
showOrgDetails={showOrganizations}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy