refactor: used bootstrap method from ladder

This commit is contained in:
Daniel Ledda
2022-05-28 19:40:07 +02:00
parent 9224cea4dc
commit ebe322dd15
3 changed files with 16 additions and 21 deletions

View File

@@ -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);
}