refactor: make match-collector export its types, and consume them in frontend
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { LANE_IMAGES, lanePositionToIndex, POSITIONS_STR } from '~/utils/cdragon'
|
||||
|
||||
import type { LaneData, ChampionData, Champion } from 'match_collector'
|
||||
|
||||
const route = useRoute()
|
||||
const lane = route.params.lane as string
|
||||
|
||||
const { data: championsData }: ChampionsResponse = await useFetch('/api/cdragon/champion-summary')
|
||||
const { data: championsData }: { data: Ref<Array<Champion>> } = await useFetch(
|
||||
'/api/cdragon/champion-summary'
|
||||
)
|
||||
|
||||
const { data: championsLanes }: { data: Ref<Array<ChampionData>> } =
|
||||
await useFetch('/api/champions')
|
||||
|
||||
Reference in New Issue
Block a user