From 130e1f03f970e177f03683eb1b925e42836ed71c Mon Sep 17 00:00:00 2001 From: "yves.gugger" Date: Thu, 11 Dec 2025 12:00:34 +0100 Subject: [PATCH] fix: Public Auctions Page now uses unified Market Feed API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- frontend/src/app/auctions/page.tsx | 41 +++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/auctions/page.tsx b/frontend/src/app/auctions/page.tsx index d6e224f..b049269 100644 --- a/frontend/src/app/auctions/page.tsx +++ b/frontend/src/app/auctions/page.tsx @@ -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 {