Skip to content

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

greptile review fixes

x032205d3c1ebbad289
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountCard.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountCard.tsx
index 67fa7fe58f..f7e69e0a3b 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountCard.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountCard.tsx
@@ -44,12 +44,9 @@ export const PamAccountCard = ({ account, onAccess, accountPath, onUpdate, onDel
type: "info"
});
- const timer = setTimeout(() => setIsIdCopied.off(), 2000);
-
- // eslint-disable-next-line consistent-return
- return () => clearTimeout(timer);
+ setTimeout(() => setIsIdCopied.off(), 2000);
},
- [isIdCopied]
+ [setIsIdCopied]
);
return (
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx
index c8196cf32a..8939543c2c 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx
@@ -66,12 +66,9 @@ export const PamAccountRow = ({
type: "info"
});
- const timer = setTimeout(() => setIsIdCopied.off(), 2000);
-
- // eslint-disable-next-line consistent-return
- return () => clearTimeout(timer);
+ setTimeout(() => setIsIdCopied.off(), 2000);
},
- [isIdCopied]
+ [setIsIdCopied]
);
return (