bakalarska_praca/database/node_modules/laravel-vite-plugin/inertia-helpers/index.js

8 lines
242 B
JavaScript
Raw Normal View History

2023-05-11 19:57:12 +00:00
export async function resolvePageComponent(path, pages) {
const page = pages[path];
if (typeof page === 'undefined') {
throw new Error(`Page not found: ${path}`);
}
return typeof page === 'function' ? page() : page;
}