- changed names for vue-router modules.

This commit is contained in:
Eugene Serb 2022-08-11 17:57:18 +03:00
parent 501f1ce273
commit 1f658e4e6f
3 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import PatternsView from '@/views/PatternsView.vue';
import VueRouterQueryRoutes from '@/router/modules/VueRouterQueryRoute';
import VueRouterMetaTags from '@/router/modules/VueRouterMetaTags';
import QueryRouter from '@/router/modules/QueryRouter';
import MetaTagUpdater from '@/router/modules/MetaTagUpdater';
const routes: Array<RouteRecordRaw> = [
{
@ -40,8 +40,8 @@ const router = createRouter({
routes,
});
router.beforeEach(VueRouterQueryRoutes.update);
router.beforeEach(VueRouterMetaTags.update);
router.beforeEach(QueryRouter.update);
router.beforeEach(MetaTagUpdater.update);
export default router;

View File

@ -40,9 +40,9 @@ function updateMetatag(
return next();
}
const VueRouterMetaTags = {
const MetaTagUpdater = {
update: updateMetatag,
};
export default VueRouterMetaTags;
export default MetaTagUpdater;

View File

@ -1,5 +1,5 @@
import router from '@/router';
import { NavigationGuardNext, RouteLocationNormalized, RouteRecordNormalized } from "vue-router";
import { NavigationGuardNext, RouteLocationNormalized } from "vue-router";
function updateRoute(
to: RouteLocationNormalized,
@ -20,9 +20,9 @@ function updateRoute(
return next();
}
const VueRouterQueryRoutes = {
const QueryRouter = {
update: updateRoute,
};
export default VueRouterQueryRoutes;
export default QueryRouter;