fix: route issues
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
import NotFound from '@/views/NotFound.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
@@ -10,21 +11,26 @@ const router = createRouter({
|
||||
component: () => import('@/views/Home.vue'),
|
||||
},
|
||||
{
|
||||
path: '/favorites/:offset(\d+)?',
|
||||
path: '/favorites/:offset?',
|
||||
name: 'favorite-messages',
|
||||
component: () => import('@/views/FavoriteMessages.vue'),
|
||||
},
|
||||
{
|
||||
path: '/channels/:channel/messages/:offset(\d+)?',
|
||||
path: '/channels/:channel/messages/:offset?',
|
||||
name: 'channel-messages',
|
||||
component: () => import('@/views/ChannelMessages.vue'),
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
name: 'NotFound',
|
||||
component: import('@/views/NotFound.vue'),
|
||||
component: NotFound,
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
// router.beforeEach((to, from, next) => {
|
||||
// console.log(to)
|
||||
// next()
|
||||
// })
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user