2 Commits

Author SHA1 Message Date
fa3d65acde fix: Ensure consistent price calculations across all pages
PROBLEM:
- TLD prices in overview table differed from detail page
- Detail page was recalculating prices instead of using API data

SOLUTION:
1. Updated Frontend API types to include all backend fields:
   - getTldCompare: Added type, description, registry, introduced,
     cheapest_registrar, cheapest_price, price_range
   - getTldHistory: Added type, description, registry, trend,
     trend_reason, source

2. Fixed TLD Detail Page:
   - Now uses price_range from Compare API directly
   - Removed manual price recalculation
   - Uses trend/trend_reason from History API
   - All values now match Overview table exactly

RESULT:
- Prices are now 100% consistent:
  - Overview table shows avg_registration_price from /overview API
  - Detail page shows pricing.avg from /compare API (same values)
  - Trending cards show current_price from /trending API (same values)
  - All calculated using get_avg_price() in backend
2025-12-08 11:55:16 +01:00
74670cf9e5 fix: Correct portfolio import and TypeScript errors
- Fixed import: get_current_user from app.api.deps (not app.api.auth)
- Removed empty routes folder
- Fixed TldHistory interface (optional trend fields)
- Fixed DomainCheckResult interface (nullable fields)
- Fixed loadData function to compute values from available API data
2025-12-08 11:26:35 +01:00