From 5a1d3f2847196ce77b39978353f5d7085aca340b Mon Sep 17 00:00:00 2001
From: Yves Gugger
Date: Fri, 12 Dec 2025 20:47:41 +0100
Subject: [PATCH] fix: TypeScript build errors & CORS config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Frontend Fixes:
- command/auctions: Fix addDomainToWatchlist → addDomain, Set iteration
- command/dashboard: Add missing Bell icon import
- command/portfolio: Optional chaining for valuation_formula
- command/pricing: Wrap AlertTriangle in span for title prop
- command/watchlist: Fix Badge className, optional form event
- legal/privacy: Escape >> in JSX
- api.ts: Add optional valuation_formula to DomainValuation
Server:
- CORS: Added http://10.42.0.73:3000 to allowed origins
- Email verification enabled
---
frontend/src/app/command/auctions/page.tsx | 4 ++--
frontend/src/app/command/dashboard/page.tsx | 1 +
frontend/src/app/command/portfolio/page.tsx | 10 ++++++----
frontend/src/app/command/pricing/[tld]/page.tsx | 7 +++----
frontend/src/app/command/watchlist/page.tsx | 6 +++---
frontend/src/app/legal/privacy/page.tsx | 6 +++---
frontend/src/lib/api.ts | 1 +
7 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/frontend/src/app/command/auctions/page.tsx b/frontend/src/app/command/auctions/page.tsx
index 811b3ea..807f9c8 100755
--- a/frontend/src/app/command/auctions/page.tsx
+++ b/frontend/src/app/command/auctions/page.tsx
@@ -202,8 +202,8 @@ export default function AuctionsPage() {
setTrackingInProgress(domain)
try {
- await api.addDomainToWatchlist({ domain })
- setTrackedDomains(prev => new Set([...prev, domain]))
+ await api.addDomain(domain)
+ setTrackedDomains(prev => new Set([...Array.from(prev), domain]))
} catch (error) {
console.error('Failed to track domain:', error)
} finally {
diff --git a/frontend/src/app/command/dashboard/page.tsx b/frontend/src/app/command/dashboard/page.tsx
index 8eb8e1f..8b2837f 100755
--- a/frontend/src/app/command/dashboard/page.tsx
+++ b/frontend/src/app/command/dashboard/page.tsx
@@ -22,6 +22,7 @@ import {
Activity,
Loader2,
Search,
+ Bell,
} from 'lucide-react'
import clsx from 'clsx'
import Link from 'next/link'
diff --git a/frontend/src/app/command/portfolio/page.tsx b/frontend/src/app/command/portfolio/page.tsx
index 8b6db85..f2b4420 100755
--- a/frontend/src/app/command/portfolio/page.tsx
+++ b/frontend/src/app/command/portfolio/page.tsx
@@ -705,10 +705,12 @@ export default function PortfolioPage() {
{valuation.confidence}
-
-
Valuation Formula
-
{valuation.valuation_formula}
-
+ {valuation.valuation_formula && (
+
+
Valuation Formula
+
{valuation.valuation_formula}
+
+ )}
This is an algorithmic estimate based on domain length, TLD, and market patterns. Actual market value may vary.
diff --git a/frontend/src/app/command/pricing/[tld]/page.tsx b/frontend/src/app/command/pricing/[tld]/page.tsx
index 2c1104e..f2bb738 100755
--- a/frontend/src/app/command/pricing/[tld]/page.tsx
+++ b/frontend/src/app/command/pricing/[tld]/page.tsx
@@ -575,10 +575,9 @@ export default function CommandTldDetailPage() {
${registrar.renewal_price.toFixed(2)}
{hasRenewalTrap && (
-
+
+
+
)}
diff --git a/frontend/src/app/command/watchlist/page.tsx b/frontend/src/app/command/watchlist/page.tsx
index d925131..770bc3d 100755
--- a/frontend/src/app/command/watchlist/page.tsx
+++ b/frontend/src/app/command/watchlist/page.tsx
@@ -133,8 +133,8 @@ export default function WatchlistPage() {
], [stats])
// Callbacks - prevent recreation on every render
- const handleAddDomain = useCallback(async (e: React.FormEvent) => {
- e.preventDefault()
+ const handleAddDomain = useCallback(async (e?: React.FormEvent) => {
+ e?.preventDefault()
if (!newDomain.trim()) return
setAdding(true)
@@ -227,7 +227,7 @@ export default function WatchlistPage() {
{domain.name}
{domain.is_available && (
- AVAILABLE
+ AVAILABLE
)}
diff --git a/frontend/src/app/legal/privacy/page.tsx b/frontend/src/app/legal/privacy/page.tsx
index bdb03ea..426d3b3 100644
--- a/frontend/src/app/legal/privacy/page.tsx
+++ b/frontend/src/app/legal/privacy/page.tsx
@@ -108,15 +108,15 @@ export default function PrivacyPage() {
-
- >>
+ {'>>'}
Provide millisecond-latency domain availability checks.
-
- >>
+ {'>>'}
Execute automated acquisition strategies (Sniper Mode).
-
- >>
+ {'>>'}
Process encrypted transactions via secure gateways.
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts
index 3909f61..19cc02e 100644
--- a/frontend/src/lib/api.ts
+++ b/frontend/src/lib/api.ts
@@ -906,6 +906,7 @@ export interface DomainValuation {
confidence: string
source: string
calculated_at: string
+ valuation_formula?: string
}
export interface PriceAlert {