Fix api call to fetch the secret value, if there is a secret on the folder it should take precedence rather than an import secret

This commit is contained in:
Carlos Monastyrski
2025-10-14 18:43:33 -03:00
parent 1169940cf1
commit f478ef99c3
2 changed files with 5 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ type Props = {
isImported: boolean;
}[];
}[];
isSecretPresent?: boolean;
};
export const SecretEditRow = ({
@@ -101,7 +102,8 @@ export const SecretEditRow = ({
isRotatedSecret,
importedBy,
importedSecret,
isEmpty
isEmpty,
isSecretPresent
}: Props) => {
const { handlePopUpOpen, handlePopUpToggle, handlePopUpClose, popUp } = usePopUp([
"editSecret"
@@ -113,7 +115,7 @@ export const SecretEditRow = ({
const [isFieldFocused, setIsFieldFocused] = useToggle();
const fetchSecretValueParams = importedSecret
const fetchSecretValueParams = importedSecret && !isSecretPresent
? {
environment: importedSecret.environment,
secretPath: importedSecret.secretPath,

View File

@@ -284,6 +284,7 @@ export const SecretOverviewTableRow = ({
environment={slug}
isRotatedSecret={secret?.isRotatedSecret}
importedBy={importedBy}
isSecretPresent={Boolean(secret)}
/>
</td>
</tr>