Fix getImportReplicatedFolder function to retrieve only the id part of it

This commit is contained in:
Carlos Monastyrski
2025-10-22 14:35:59 -03:00
parent 0c7a5cfe27
commit 5887b64a9e

View File

@@ -130,7 +130,8 @@ export const SecretImportListView = ({
const [items, setItems] = useState(secretImports ?? []);
const getImportReplicatedFolder = (importPath: string) => {
const cleanImportPath = importPath.replace("/__reserve_replication_", "");
if (!importPath.includes("/__reserve_replication_")) return;
const cleanImportPath = importPath.split("/__reserve_replication_")[1];
const replicatedFolder = items?.find(({ id }) => id === cleanImportPath);
return replicatedFolder;
};