diff --git a/.changeset/moody-crabs-march.md b/.changeset/moody-crabs-march.md
index f3ae24629a..b5ddf12ffa 100644
--- a/.changeset/moody-crabs-march.md
+++ b/.changeset/moody-crabs-march.md
@@ -3,4 +3,4 @@
'@backstage/plugin-vault-backend': patch
---
-Added a path notion in addition to secret name to allow to differentiate secrets in subpaths
+Added a path notion in addition to secret name to allow to differentiate secrets in sub-paths
diff --git a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx
index 5923a4db6b..efc345b07f 100644
--- a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx
+++ b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx
@@ -32,13 +32,6 @@ export const vaultSecretPath = (entity: Entity) => {
return { secretPath };
};
-function getSecretRelativeName(
- secretPath: string,
- secret: VaultSecret,
-): string {
- return `${secret.path.replace(`${secretPath}/`, '')}/${secret.name}`;
-}
-
export const EntityVaultTable = ({ entity }: { entity: Entity }) => {
const vaultApi = useApi(vaultApiRef);
const { secretPath } = vaultSecretPath(entity);
@@ -60,12 +53,16 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => {
];
const data = (value || []).map(secret => {
+ const secretName = `${secret.path.replace(`${secretPath}/`, '')}/${
+ secret.name
+ }`;
+
return {
- secret: getSecretRelativeName(secretPath, secret),
+ secret: secretName,
view: (
@@ -74,7 +71,7 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => {
edit: (