fix(openapi-ts): replace api call with generated api client

This commit is contained in:
2026-05-23 19:51:08 +02:00
parent f1afb2096f
commit 43b314bb20
6 changed files with 29 additions and 24 deletions
+5 -3
View File
@@ -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;
});