Add horizontal limit, search bar and change icons of access tree component

This commit is contained in:
carlosmonastyrski
2025-03-26 11:13:12 -03:00
parent bc1b7ddcc5
commit d5741b4a72
9 changed files with 339 additions and 43 deletions
@@ -1,14 +1,11 @@
import { TSecretFolders } from "@app/db/schemas";
import { InternalServerError } from "@app/lib/errors";
export const buildFolderPath = (
folder: TSecretFolders,
foldersMap: Record<string, TSecretFolders>,
depth: number = 0
): string => {
if (depth > 20) {
throw new InternalServerError({ message: "Maximum folder depth of 20 exceeded" });
}
if (depth > 20) return;
if (!folder.parentId) {
return depth === 0 ? "/" : "";
}