add in game details
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
import GameList from '../vues/GameList.vue'
|
||||
import GameDetails from '../vues/GameDetails.vue'
|
||||
|
||||
const rootPath = {
|
||||
const root = {
|
||||
path: '/',
|
||||
component: GameList
|
||||
redirect: '/games'
|
||||
}
|
||||
|
||||
const gameListRoute = {
|
||||
path: '/potato',
|
||||
path: '/games',
|
||||
component: GameList
|
||||
}
|
||||
|
||||
const routes = [rootPath, gameListRoute]
|
||||
const gameDetailsRoute = {
|
||||
path: '/games/:gameId',
|
||||
component: GameDetails
|
||||
}
|
||||
|
||||
const routes = [root, gameListRoute, gameDetailsRoute]
|
||||
|
||||
export default createRouter({
|
||||
history: createWebHashHistory(),
|
||||
|
||||
Reference in New Issue
Block a user