UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

27 lines (25 loc) • 648 B
function findRootLayout(routes, routerRoot) { const exactKey = `/${routerRoot}/_layout.tsx`; if (routes[exactKey]) return routes[exactKey](); for (const suffix of [ "+ssg", "+ssr", "+spa" ]) { const key = `/${routerRoot}/_layout${suffix}.tsx`; if (routes[key]) return routes[key](); } const exactKeyTs = `/${routerRoot}/_layout.ts`; if (routes[exactKeyTs]) return routes[exactKeyTs](); for (const suffix of [ "+ssg", "+ssr", "+spa" ]) { const key = `/${routerRoot}/_layout${suffix}.ts`; if (routes[key]) return routes[key](); } return void 0; } export { findRootLayout }; //# sourceMappingURL=findRootLayout.mjs.map