Migrate all the things
* Migrates from Mongo to Postgres. * Migrates from JSPM to Webpack. * Migrates from React to Vuejs. * Migrates from Bootstrap to Bulma. Also: * Fixes rendering of meta data in the document head tag.
This commit is contained in:
parent
09706778d9
commit
7bb0497ff4
76 changed files with 6741 additions and 1760 deletions
25
public/src/router/index.js
Normal file
25
public/src/router/index.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
import index from '../views/index.vue';
|
||||
import share from '../views/share.vue';
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
const router = new Router({
|
||||
mode: 'history',
|
||||
routes: [
|
||||
{ path: '/', component: index },
|
||||
{ path: '/:service/:type/:id', name: 'share', component: share },
|
||||
],
|
||||
});
|
||||
|
||||
router.afterEach((to) => {
|
||||
if (typeof window !== 'undefined') {
|
||||
ga('send', { // eslint-disable-line no-undef
|
||||
hitType: 'pageview',
|
||||
page: to.fullPath,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
Add table
Add a link
Reference in a new issue