TenantAtlas/apps/platform/.pnpm-store/v10/files/77/907b16189e7cdf7e4b955dd72d2990b4d07b430c9be94f841873b67dcc2d035e508cf93cc64c6999e1d8f6e2fff8207f88c10bc61994dbd209a7187f87a4b9
Ahmed Darrazi 9f74f7a658
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
feat: compress governance operator outcomes
2026-04-19 14:15:11 +02:00

11 lines
340 B
Plaintext

export async function resolvePageComponent(path, pages) {
for (const p of (Array.isArray(path) ? path : [path])) {
const page = pages[p];
if (typeof page === 'undefined') {
continue;
}
return typeof page === 'function' ? page() : page;
}
throw new Error(`Page not found: ${path}`);
}