fucking vuew wont import

This commit is contained in:
jmosrael@gmail.com
2024-05-12 19:33:44 -07:00
parent e61d0e6474
commit e00f0389d1

View File

@@ -3,12 +3,15 @@
<h1>{{ character.characterName }} - {{character.role}}</h1> <h1>{{ character.characterName }} - {{character.role}}</h1>
<h2>Status: {{ character.status }}</h2> <h2>Status: {{ character.status }}</h2>
<h2>Player: {{ character.playerName }}</h2> <h2>Player: {{ character.playerName }}</h2>
<GameTable gameList="gamesPlayed"></GameTable>
<game-table gameList="gamesApplied"></game-table>
</v-container> </v-container>
</template> </template>
<style></style> <style></style>
<script setup lang="ts"> <script setup lang="ts">
import { GameTable } from './GameTable.vue'
import { onMounted, watch, ref } from 'vue' import { onMounted, watch, ref } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import axios from 'axios' import axios from 'axios'
@@ -17,6 +20,8 @@ const route = useRoute()
const characterId = ref(route.params.characterId) const characterId = ref(route.params.characterId)
const character = ref({}) const character = ref({})
const gamesPlayed = ref({})
const gamesApplied = ref({})
async function loadCharacterDetails() { async function loadCharacterDetails() {
const characterResponse = await axios.get(`/api/character/${characterId.value}`) const characterResponse = await axios.get(`/api/character/${characterId.value}`)
@@ -26,6 +31,8 @@ async function loadCharacterDetails() {
console.log(gameDetails) console.log(gameDetails)
character.value = characterResponse.data character.value = characterResponse.data
gamesPlayed.value = gameDetails.data.characterPickedForGame
gamesApplied.value = gameDetails.data.characterAppliedForGame
} }
onMounted(async () => { onMounted(async () => {