fix(openapi-ts): replace api call with generated api client
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { polylanSubmitterApiGetUserInfo, marketApiListMarkets } from "./api";
|
||||
import type { UserInfoOut } from "./api/types.gen";
|
||||
import type { Market } from "./types";
|
||||
import MarketCard from "./components/MarketCard.vue";
|
||||
import UserBets from "./components/UserBets.vue";
|
||||
|
||||
const markets = ref<any[]>([]);
|
||||
const markets = ref<Market[]>([]);
|
||||
const loading = ref(true);
|
||||
const userInfo = ref<any>(null);
|
||||
const userInfo = ref<UserInfoOut | undefined>();
|
||||
|
||||
const goHome = () => {
|
||||
window.location.href = "/";
|
||||
@@ -26,7 +28,7 @@ onMounted(async () => {
|
||||
// Fetch markets
|
||||
const response = await marketApiListMarkets();
|
||||
if (response.data) {
|
||||
markets.value = response.data;
|
||||
markets.value = response.data as unknown as Market[];
|
||||
}
|
||||
loading.value = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user