summaryrefslogtreecommitdiff
path: root/src/router/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/router/index.ts')
-rw-r--r--src/router/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/router/index.ts b/src/router/index.ts
index 8165667..04828e4 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -49,6 +49,11 @@ const router = createRouter({
routes,
});
+router.beforeResolve((to, from, next) => {
+ self.dispatchEvent(new Event("initial-load"));
+ next();
+});
+
router.afterEach((to,) => {
const mainTitle = document.querySelector("#app > .content > h1");