refactor: used bootstrap method from ladder
This commit is contained in:
29
src/main.ts
29
src/main.ts
@@ -1,20 +1,15 @@
|
||||
import RootView from "@/ui/Root/RootView";
|
||||
import "@/ui/global.css";
|
||||
import { bootstrap } from "@djledda/ladder";
|
||||
|
||||
const appNode = document.querySelector("#app");
|
||||
|
||||
if (appNode) {
|
||||
try {
|
||||
const appRoot = new RootView({
|
||||
orientation: "vertical",
|
||||
title: "Drum Slayer",
|
||||
});
|
||||
window.appRoot = appRoot;
|
||||
appNode.appendChild(appRoot.render());
|
||||
console.log("OK!");
|
||||
} catch (e) {
|
||||
console.error("FUCK!", e);
|
||||
}
|
||||
} else {
|
||||
console.error("FUCK!");
|
||||
}
|
||||
try {
|
||||
const appRoot = new RootView({
|
||||
orientation: "vertical",
|
||||
title: "Drum Slayer",
|
||||
});
|
||||
window.appRoot = appRoot;
|
||||
bootstrap(appRoot, "app");
|
||||
console.log("OK!");
|
||||
} catch (e) {
|
||||
console.error("FUCK!", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user