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:
@ -164,16 +164,39 @@ export default function AuctionsPage() {
|
|||||||
const loadAuctions = async () => {
|
const loadAuctions = async () => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
try {
|
try {
|
||||||
const [all, ending, hot, pounce] = await Promise.all([
|
// Use unified feed API for all data - same as Terminal Market Page
|
||||||
api.getAuctions(undefined, undefined, undefined, undefined, undefined, false, 'ending', 100, 0),
|
const [allFeed, endingFeed, hotFeed, pounceFeed] = await Promise.all([
|
||||||
api.getEndingSoonAuctions(24, 50), // 24 hours, limit 50
|
api.getMarketFeed({ source: 'all', limit: 100, sortBy: 'time' }),
|
||||||
api.getHotAuctions(50),
|
api.getMarketFeed({ source: 'external', endingWithin: 24, limit: 50, sortBy: 'time' }),
|
||||||
api.getMarketFeed({ source: 'pounce', limit: 10 }).catch(() => ({ items: [] })),
|
api.getMarketFeed({ source: 'external', limit: 50, sortBy: 'score' }), // Hot = highest score
|
||||||
|
api.getMarketFeed({ source: 'pounce', limit: 10 }),
|
||||||
])
|
])
|
||||||
setAllAuctions(all.auctions || [])
|
|
||||||
setEndingSoon(ending || [])
|
// Convert MarketItem to Auction format for compatibility
|
||||||
setHotAuctions(hot || [])
|
const convertToAuction = (item: MarketItem): Auction => ({
|
||||||
setPounceItems(pounce.items || [])
|
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) {
|
} catch (error) {
|
||||||
console.error('Failed to load auctions:', error)
|
console.error('Failed to load auctions:', error)
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user