Skip to content

Commit

Permalink
fix: use new built-in route announcer
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Jun 12, 2024
1 parent 2e9c7ab commit e489568
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 48 deletions.
47 changes: 0 additions & 47 deletions components/route-announcer.vue

This file was deleted.

8 changes: 7 additions & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const env = useRuntimeConfig();
const locale = useLocale();
const t = useTranslations();
const router = useRouter();
const i18nHead = useLocaleHead({
addDirAttribute: true,
identifierAttribute: "id",
Expand Down Expand Up @@ -91,6 +93,10 @@ useHead({
return scripts;
}),
});
router.afterEach((to, from) => {
trackPageView(to, from);
});
</script>

<template>
Expand All @@ -103,6 +109,6 @@ useHead({
</ErrorBoundary>
<AppFooter />

<RouteAnnouncer />
<NuxtRouteAnnouncer />
</div>
</template>

0 comments on commit e489568

Please sign in to comment.