Skip to content

Commit

Permalink
test(result): add test page
Browse files Browse the repository at this point in the history
  • Loading branch information
wrzrmzx committed Jan 16, 2024
1 parent 20fe5ff commit 9c925c0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/result/src/lib/getIDtoName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { characterList } from '@touhou-vote/shared/data/character'
import { musicList } from '@touhou-vote/shared/data/music'

export function getIDtoCharacterName() {
return characterList.map((item) => {
return {
id: item.id,
name: item.name,
}
})
}

export function getIDtoMusicName() {
return musicList.map((item) => {
return {
id: item.id,
name: item.name,
}
})
}
7 changes: 7 additions & 0 deletions packages/result/src/pages/Test.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<div>{{ getIDtoCharacterName() }}</div>
<div>{{ getIDtoMusicName() }}</div>
</template>
<script lang="ts" setup>
import { getIDtoCharacterName, getIDtoMusicName } from '@/lib/getIDtoName'
</script>

0 comments on commit 9c925c0

Please sign in to comment.