import { getContestList } from '@/api/base'

// 赛项信息
interface ContestType {
  id: string
  name: string
}

const contests = ref<ContestType[]>([])
export function useGetContestList() {
  !contests.value.length &&
    getContestList().then((res: any) => {
      contests.value = res.data.list
    })

  return { contests }
}
