18 lines
411 B
JavaScript
Raw Normal View History

2025-01-05 17:23:49 +03:00
import {TgApp} from "./tg_app/TgApp.js";
2025-01-19 17:15:58 +03:00
import Router from "./tg_app/Router.js";
2025-01-03 18:34:03 +03:00
document.addEventListener("DOMContentLoaded", () => {
2025-01-05 17:23:49 +03:00
let tg = window.Telegram.WebApp;
let tgApp = new TgApp("tg_app", tg.initDataUnsafe.user.id);
2025-01-04 01:38:59 +03:00
2025-01-19 17:15:58 +03:00
const router = new Router({
mode: 'hash',
root: '/miniapp'
});
router
.add('', () => {
tgApp.actionMain();
});
2025-01-03 18:34:03 +03:00
});