fix: Public Auctions Page now uses unified Market Feed API

SYNC FIX:
- Public /auctions page now uses api.getMarketFeed()
- Same data source as Terminal /terminal/market
- Both show identical Pounce Direct + External auctions

CONCEPT REVIEW COMPLETED:
All Phase 1 features from concept docs implemented:
-  TLD Pricing with Renewal Price & Trends
-  Auction Aggregator (8+ sources, 542+ auctions)
-  Vanity Filter for public visitors
-  Pounce Direct Listings (0% commission)
-  DNS Verification for ownership
-  RADAR Dashboard
-  MARKET Feed with unified API
-  INTEL (TLD Data with registrar finder)
-  WATCHLIST with monitoring
-  Subscription tiers (Scout/Trader/Tycoon)
-  Stripe integration
-  Pounce Score algorithm
-  Affiliate links for all platforms
-  Sniper Alerts
-  SEO pages per TLD
-  Listing limits (2/10/50 by tier)
-  Featured listings field
This commit is contained in:
yves.gugger
2025-12-11 12:00:34 +01:00
parent 3290c6e6d8
commit 130e1f03f9

View File

@ -164,16 +164,39 @@ export default function AuctionsPage() {
const loadAuctions = async () => {
setLoading(true)
try {
const [all, ending, hot, pounce] = await Promise.all([
api.getAuctions(undefined, undefined, undefined, undefined, undefined, false, 'ending', 100, 0),
api.getEndingSoonAuctions(24, 50), // 24 hours, limit 50
api.getHotAuctions(50),
api.getMarketFeed({ source: 'pounce', limit: 10 }).catch(() => ({ items: [] })),
// Use unified feed API for all data - same as Terminal Market Page
const [allFeed, endingFeed, hotFeed, pounceFeed] = await Promise.all([
api.getMarketFeed({ source: 'all', limit: 100, sortBy: 'time' }),
api.getMarketFeed({ source: 'external', endingWithin: 24, limit: 50, sortBy: 'time' }),
api.getMarketFeed({ source: 'external', limit: 50, sortBy: 'score' }), // Hot = highest score
api.getMarketFeed({ source: 'pounce', limit: 10 }),
])
setAllAuctions(all.auctions || [])
setEndingSoon(ending || [])
setHotAuctions(hot || [])
setPounceItems(pounce.items || [])
// Convert MarketItem to Auction format for compatibility
const convertToAuction = (item: MarketItem): Auction => ({
domain: item.domain,
platform: item.source,
platform_url: item.url,
current_bid: item.price,
currency: item.currency,
num_bids: item.num_bids || 0,
end_time: item.end_time || '',
time_remaining: item.time_remaining || '',
buy_now_price: item.price_type === 'fixed' ? item.price : null,
reserve_met: null,
traffic: null,
age_years: null,
tld: item.tld,
affiliate_url: item.url,
})
// Filter out Pounce Direct from auction lists (they go in separate section)
const externalOnly = (items: MarketItem[]) => items.filter(i => !i.is_pounce).map(convertToAuction)
setAllAuctions(externalOnly(allFeed.items || []))
setEndingSoon(externalOnly(endingFeed.items || []))
setHotAuctions(externalOnly(hotFeed.items || []))
setPounceItems(pounceFeed.items || [])
} catch (error) {
console.error('Failed to load auctions:', error)
} finally {