fix: resolved dashboardpage latestKey undefined error

This commit is contained in:
akhilmhdh
2023-06-16 20:45:31 +05:30
parent 15fc12627a
commit 7f7e63236b
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -150,7 +150,7 @@ export const useGetProjectSecrets = ({
} }
}); });
return { secrets: sharedSecrets }; return { secrets: sharedSecrets };
}, []) }, [decryptFileKey])
}); });
export const useGetProjectSecretsByKey = ({ export const useGetProjectSecretsByKey = ({
@@ -242,7 +242,7 @@ export const useGetProjectSecretsByKey = ({
}); });
return { secrets: sharedSecrets, uniqueSecCount: Object.keys(uniqSecKeys).length }; return { secrets: sharedSecrets, uniqueSecCount: Object.keys(uniqSecKeys).length };
}, []) }, [decryptFileKey])
}); });
const fetchEncryptedSecretVersion = async (secretId: string, offset: number, limit: number) => { const fetchEncryptedSecretVersion = async (secretId: string, offset: number, limit: number) => {
@@ -24,7 +24,6 @@ export const DashboardEnvOverview = () => {
const { currentWorkspace, isLoading } = useWorkspace(); const { currentWorkspace, isLoading } = useWorkspace();
const workspaceId = currentWorkspace?._id as string; const workspaceId = currentWorkspace?._id as string;
const { data: latestFileKey } = useGetUserWsKey(workspaceId); const { data: latestFileKey } = useGetUserWsKey(workspaceId);
const [searchFilter, setSearchFilter] = useState(''); const [searchFilter, setSearchFilter] = useState('');
const secretPath = router.query?.secretPath as string; const secretPath = router.query?.secretPath as string;