fix: Correct API method calls in market page

This commit is contained in:
2025-12-10 20:25:51 +01:00
parent 1b45d23c66
commit 92b11943a6

View File

@ -60,11 +60,12 @@ export default function MarketPage() {
data = await api.getHotAuctions(50) data = await api.getHotAuctions(50)
break break
case 'opportunities': case 'opportunities':
data = await api.getOpportunityAuctions(50) const oppData = await api.getAuctionOpportunities()
data = (oppData.opportunities || []).map((o: any) => o.auction)
break break
default: default:
const response = await api.getAuctions({ limit: 50, sort_by: sortBy }) const auctionData = await api.getAuctions(undefined, undefined, undefined, undefined, undefined, false, sortBy, 50)
data = response.auctions || [] data = auctionData.auctions || []
} }
setAuctions(data) setAuctions(data)
} catch (error) { } catch (error) {