Skip to content

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

fix: resolved dashboardpage latestKey undefined error

akhilmhdh7f7e63236b44
diff --git a/frontend/src/hooks/api/secrets/queries.tsx b/frontend/src/hooks/api/secrets/queries.tsx
index 89137b03c4..39ac39b5e4 100644
--- a/frontend/src/hooks/api/secrets/queries.tsx
+++ b/frontend/src/hooks/api/secrets/queries.tsx
@@ -150,7 +150,7 @@ export const useGetProjectSecrets = ({
}
});
return { secrets: sharedSecrets };
- }, [])
+ }, [decryptFileKey])
});
export const useGetProjectSecretsByKey = ({
@@ -242,7 +242,7 @@ export const useGetProjectSecretsByKey = ({
});
return { secrets: sharedSecrets, uniqueSecCount: Object.keys(uniqSecKeys).length };
- }, [])
+ }, [decryptFileKey])
});
const fetchEncryptedSecretVersion = async (secretId: string, offset: number, limit: number) => {
diff --git a/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx b/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx
index 0ac6a56513..033f7f1e21 100644
--- a/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx
+++ b/frontend/src/views/DashboardPage/DashboardEnvOverview.tsx
@@ -24,7 +24,6 @@ export const DashboardEnvOverview = () => {
const { currentWorkspace, isLoading } = useWorkspace();
const workspaceId = currentWorkspace?._id as string;
const { data: latestFileKey } = useGetUserWsKey(workspaceId);
-
const [searchFilter, setSearchFilter] = useState('');
const secretPath = router.query?.secretPath as string;