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
@@ -2,6 +2,7 @@
import { ref, computed, onMounted } from "vue";
import { polylanSubmitterApiGetUserInfo, marketApiCreateBet, marketApiListUserBets } from "../api";
import type { Market } from "../types";
import type { UserInfoOut, UserBetSchema } from "../api/types.gen";
const props = defineProps<{
market: Market;
@@ -15,9 +16,9 @@ const selectedOption = ref<string | null>(null);
const betAmount = ref<number>(0);
const loading = ref(false);
const error = ref<string>("");
const userInfo = ref<any>(null);
const userBets = ref<any[]>([]);
const existingBet = ref<any | null>(null);
const userInfo = ref<UserInfoOut | undefined>();
const userBets = ref<UserBetSchema[]>([]);
const existingBet = ref<UserBetSchema | null>(null);
const timeRemaining = computed(() => {
const endDate = new Date(props.market.end_date).getTime();