Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: hide pam insights view buttons when count is 0

bernie-g13f8b0874efe
diff --git a/frontend/src/pages/pam/InsightsPage/components/PamInsightsKpiCards.tsx b/frontend/src/pages/pam/InsightsPage/components/PamInsightsKpiCards.tsx
index 6082e0c1bf..1f9380f6b9 100644
--- a/frontend/src/pages/pam/InsightsPage/components/PamInsightsKpiCards.tsx
+++ b/frontend/src/pages/pam/InsightsPage/components/PamInsightsKpiCards.tsx
@@ -254,11 +254,11 @@ const StatCard = ({
) : (
viewLabel &&
to &&
- params && (
+ params &&
+ count > 0 && (
<Button
variant="outline"
size="xs"
- disabled={count === 0}
onClick={() => navigate({ to, params })}
>
{viewLabel}