This commit is contained in:
parent
0202946813
commit
965ca33d33
@ -46,13 +46,14 @@ async function loadComponent(name: string) {
|
|||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
const preLoad = ["index", "package", "browse_folder", "browse_file"];
|
import index from "./views/index.tsx";
|
||||||
|
componentCache.set("index", index as Component);
|
||||||
preLoad.forEach((page) =>
|
import pkg from "./views/package.tsx";
|
||||||
loadComponent(page).catch((err) =>
|
componentCache.set("package", pkg as Component);
|
||||||
console.error("Error preloading", page, err)
|
import browse_folder from "./views/browse_folder.tsx";
|
||||||
)
|
componentCache.set("browse_folder", browse_folder as Component);
|
||||||
);
|
import browse_file from "./views/browse_file.tsx";
|
||||||
|
componentCache.set("browse_file", browse_file as Component);
|
||||||
|
|
||||||
export default async function render(
|
export default async function render(
|
||||||
name: string,
|
name: string,
|
||||||
|
Loading…
Reference in New Issue
Block a user