import {TgApp} from "./tg_app/TgApp.js"; import Router from "./tg_app/Router.js"; document.addEventListener("DOMContentLoaded", () => { let tg = window.Telegram.WebApp; let tgApp = new TgApp("tg_app", tg.initDataUnsafe.user.id); const router = new Router({ mode: 'hash', root: '/miniapp' }); router .add('', () => { tgApp.actionMain(); }); });