diff --git a/frontend/src/app/tld-pricing/page.tsx b/frontend/src/app/tld-pricing/page.tsx index 2185ed8..deab65d 100644 --- a/frontend/src/app/tld-pricing/page.tsx +++ b/frontend/src/app/tld-pricing/page.tsx @@ -8,8 +8,6 @@ import { useStore } from '@/lib/store' import { api } from '@/lib/api' import { TrendingUp, - TrendingDown, - Minus, ChevronRight, ChevronLeft, Search, @@ -55,31 +53,37 @@ interface PaginationData { has_more: boolean } -// Sparkline component +// Sparkline component - matching Command Center exactly function Sparkline({ trend }: { trend: number }) { const isPositive = trend > 0 - const isNegative = trend < 0 - - // Generate simple sparkline points - const points = Array.from({ length: 8 }, (_, i) => { - const baseY = 50 - const variance = isPositive ? -trend * 3 : isNegative ? -trend * 3 : 5 - return `${i * 14},${baseY + (Math.random() * variance - variance / 2) * (i / 7)}` - }).join(' ') + const isNeutral = trend === 0 return ( -
- - +
+ + {isNeutral ? ( + + ) : isPositive ? ( + + ) : ( + + )}
) @@ -90,7 +94,7 @@ export default function TldPricingPage() { const [tlds, setTlds] = useState([]) const [trending, setTrending] = useState([]) const [loading, setLoading] = useState(true) - const [pagination, setPagination] = useState({ total: 0, limit: 25, offset: 0, has_more: false }) + const [pagination, setPagination] = useState({ total: 0, limit: 50, offset: 0, has_more: false }) // Search & Sort state const [searchQuery, setSearchQuery] = useState('') @@ -150,6 +154,28 @@ export default function TldPricingPage() { } } + // Risk badge - matching Command Center exactly + const getRiskBadge = (tld: TldData) => { + const level = tld.risk_level || 'low' + const reason = tld.risk_reason || 'Stable' + return ( + + + {reason} + + ) + } + // Get renewal trap indicator const getRenewalTrap = (tld: TldData) => { if (!tld.min_renewal_price || !tld.min_registration_price) return null @@ -348,7 +374,7 @@ export default function TldPricingPage() {
- {/* TLD Table using PremiumTable */} + {/* TLD Table using PremiumTable - matching Command Center exactly */} tld.tld} @@ -387,7 +413,7 @@ export default function TldPricingPage() { render: (tld, idx) => { const showData = isAuthenticated || (page === 0 && idx === 0) if (!showData) { - return
+ return
} return }, @@ -473,30 +499,25 @@ export default function TldPricingPage() { key: 'risk', header: 'Risk', align: 'center', - width: '80px', - hideOnMobile: true, + width: '130px', render: (tld, idx) => { const showData = isAuthenticated || (page === 0 && idx === 0) if (!showData) { - return + return ( + + + Hidden + + ) } - return ( -
- -
- ) + return getRiskBadge(tld) }, }, { - key: 'action', + key: 'actions', header: '', align: 'right', - width: '40px', + width: '80px', render: () => ( ), @@ -506,29 +527,27 @@ export default function TldPricingPage() { {/* Pagination */} {!loading && pagination.total > pagination.limit && ( -
+
- + Page {currentPage} of {totalPages}
)}