fix: address board grid review

This commit is contained in:
Thomas Camlong committed 2026-08-01 23:26:02 +02:00
1 parent d94cadd3e7
commit d0c7ba401f
54 files changed
+657 -323

No files matched your search

@@ -0,0 +1,14 @@
export const getGridDepth = (gridId: string, parentGridById: ReadonlyMap<string, string | null>) => {
let depth = 0;
let currentGridId = gridId;
const visited = new Set([gridId]);
while (true) {
const parentGridId = parentGridById.get(currentGridId);
if (!parentGridId || visited.has(parentGridId)) return depth;
depth += 1;
visited.add(parentGridId);
currentGridId = parentGridId;
}
};