mirror of
https://github.com/eugene-serb/wavelovers.git
synced 2023-09-09 23:41:16 +03:00
- changed names for vue-router modules.
This commit is contained in:
parent
501f1ce273
commit
1f658e4e6f
@ -1,7 +1,7 @@
|
|||||||
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
|
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
|
||||||
import PatternsView from '@/views/PatternsView.vue';
|
import PatternsView from '@/views/PatternsView.vue';
|
||||||
import VueRouterQueryRoutes from '@/router/modules/VueRouterQueryRoute';
|
import QueryRouter from '@/router/modules/QueryRouter';
|
||||||
import VueRouterMetaTags from '@/router/modules/VueRouterMetaTags';
|
import MetaTagUpdater from '@/router/modules/MetaTagUpdater';
|
||||||
|
|
||||||
const routes: Array<RouteRecordRaw> = [
|
const routes: Array<RouteRecordRaw> = [
|
||||||
{
|
{
|
||||||
@ -40,8 +40,8 @@ const router = createRouter({
|
|||||||
routes,
|
routes,
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach(VueRouterQueryRoutes.update);
|
router.beforeEach(QueryRouter.update);
|
||||||
router.beforeEach(VueRouterMetaTags.update);
|
router.beforeEach(MetaTagUpdater.update);
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ function updateMetatag(
|
|||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
const VueRouterMetaTags = {
|
const MetaTagUpdater = {
|
||||||
update: updateMetatag,
|
update: updateMetatag,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default VueRouterMetaTags;
|
export default MetaTagUpdater;
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { NavigationGuardNext, RouteLocationNormalized, RouteRecordNormalized } from "vue-router";
|
import { NavigationGuardNext, RouteLocationNormalized } from "vue-router";
|
||||||
|
|
||||||
function updateRoute(
|
function updateRoute(
|
||||||
to: RouteLocationNormalized,
|
to: RouteLocationNormalized,
|
||||||
@ -20,9 +20,9 @@ function updateRoute(
|
|||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
const VueRouterQueryRoutes = {
|
const QueryRouter = {
|
||||||
update: updateRoute,
|
update: updateRoute,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default VueRouterQueryRoutes;
|
export default QueryRouter;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user