parent
d41d77fcd7
commit
949baa9b8b
15 changed files with 2 additions and 305 deletions
|
|
@ -8,7 +8,6 @@ import { page } from '@/router.definition.js';
|
|||
import { $i } from '@/i.js';
|
||||
import { Nirax } from '@/lib/nirax.js';
|
||||
import { ROUTE_DEF } from '@/router.definition.js';
|
||||
import { analytics } from '@/analytics.js';
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
export type Router = Nirax<typeof ROUTE_DEF>;
|
||||
|
|
@ -31,14 +30,6 @@ mainRouter.addListener('replace', ctx => {
|
|||
window.history.replaceState({ }, '', ctx.fullPath);
|
||||
});
|
||||
|
||||
mainRouter.addListener('change', ctx => {
|
||||
if (_DEV_) console.log('mainRouter: change', ctx.fullPath);
|
||||
analytics.page({
|
||||
path: ctx.fullPath,
|
||||
title: ctx.fullPath,
|
||||
});
|
||||
});
|
||||
|
||||
mainRouter.init();
|
||||
|
||||
export function useRouter(): Router {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue