work on loading in character list data
This commit is contained in:
@@ -2,6 +2,7 @@ import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
import GameList from '../vues/GameList.vue'
|
||||
import GameDetails from '../vues/GameDetails.vue'
|
||||
import CharacterList from '../vues/CharacterList.vue'
|
||||
|
||||
const root = {
|
||||
path: '/',
|
||||
@@ -18,7 +19,12 @@ const gameDetailsRoute = {
|
||||
component: GameDetails
|
||||
}
|
||||
|
||||
const routes = [root, gameListRoute, gameDetailsRoute]
|
||||
const characterListRoute = {
|
||||
path: '/characters',
|
||||
component: CharacterList
|
||||
}
|
||||
|
||||
const routes = [root, gameListRoute, gameDetailsRoute, characterListRoute]
|
||||
|
||||
export default createRouter({
|
||||
history: createWebHashHistory(),
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onCreated, ref } from 'vue'
|
||||
import { Game, useGameStore } from '../store/gamestore'
|
||||
import axios from 'axios'
|
||||
|
||||
let page = 1
|
||||
@@ -46,6 +45,4 @@ async function previousPage() {
|
||||
page--
|
||||
games.value = await axios.post('/api/game', { page: `${page}`, count: '10', orderBy: 'id' })
|
||||
}
|
||||
|
||||
// const games = useGameStore()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user