Skip to content

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

Fix infinite loading icon on snapshot button

carlosmonastyrski0a338ee539cf
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
index e6fc5eadff..4b90e1fbb8 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
@@ -250,7 +250,11 @@ const Page = () => {
limit: 10
});
- const { data: snapshotCount, isPending: isSnapshotCountLoading } = useGetWsSnapshotCount({
+ const {
+ data: snapshotCount,
+ isPending: isSnapshotCountLoading,
+ isFetching: isSnapshotCountFetching
+ } = useGetWsSnapshotCount({
workspaceId,
environment,
directory: secretPath,
@@ -414,7 +418,7 @@ const Page = () => {
onSearchChange={handleSearchChange}
onToggleTagFilter={handleTagToggle}
snapshotCount={snapshotCount || 0}
- isSnapshotCountLoading={isSnapshotCountLoading}
+ isSnapshotCountLoading={isSnapshotCountLoading && isSnapshotCountFetching}
onToggleRowType={handleToggleRowType}
onClickRollbackMode={() => handlePopUpToggle("snapshots", true)}
protectedBranchPolicyName={boardPolicy?.name}