Skip to content

Commit

Permalink
Merge pull request #102 from Repsay/fix-build-error
Browse files Browse the repository at this point in the history
Fix TypeScript Error in src/main.ts
  • Loading branch information
guyzyl authored Jul 2, 2023
2 parents 3582e43 + 2be23d7 commit 69189d5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,22 @@ router.beforeEach(
}
);

let currentRoute: RouteLocationNormalized;

router.afterEach((to: RouteLocationNormalized) => {
// This is run after each navigation, including the initial navigation.
currentRoute = to;
});

const vueTagSettings = {
pageTrackerTemplate(to: RouteLocationNormalized) {
pageTrackerTemplate: () => {
return {
page_title: to.path,
page_path: to.path,
page_title: currentRoute.path,
page_path: currentRoute.path,
};
},
config: { id: "G-4PJJZRPWG4" },
};


createApp(App).use(router).use(VueGtag, vueTagSettings, router).mount("#app");

0 comments on commit 69189d5

Please sign in to comment.