mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 10:29:52 +00:00
Fix: UI secret import indicator
This commit is contained in:
@@ -264,12 +264,13 @@ export const useGetImportedSecretsAllEnvs = ({
|
||||
});
|
||||
|
||||
const isImportedSecretPresentInEnv = useCallback(
|
||||
(secPath: string, envSlug: string) => {
|
||||
(secPath: string, envSlug: string, secretName: string) => {
|
||||
const selectedEnvIndex = environments.indexOf(envSlug);
|
||||
|
||||
if (selectedEnvIndex !== -1) {
|
||||
const isPresent = secretImports?.[selectedEnvIndex]?.data?.find(
|
||||
({ secretPath }) => secretPath === secPath
|
||||
({ secretPath, ...rest }) =>
|
||||
secretPath === secPath && rest.secrets.some((s) => s.key === secretName)
|
||||
);
|
||||
|
||||
return Boolean(isPresent);
|
||||
|
||||
Reference in New Issue
Block a user