fix: TypeScript build errors & CORS config
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled

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
This commit is contained in:
2025-12-12 20:47:41 +01:00
parent 6cb985fa8b
commit 5a1d3f2847
7 changed files with 19 additions and 16 deletions

View File

@ -202,8 +202,8 @@ export default function AuctionsPage() {
setTrackingInProgress(domain) setTrackingInProgress(domain)
try { try {
await api.addDomainToWatchlist({ domain }) await api.addDomain(domain)
setTrackedDomains(prev => new Set([...prev, domain])) setTrackedDomains(prev => new Set([...Array.from(prev), domain]))
} catch (error) { } catch (error) {
console.error('Failed to track domain:', error) console.error('Failed to track domain:', error)
} finally { } finally {

View File

@ -22,6 +22,7 @@ import {
Activity, Activity,
Loader2, Loader2,
Search, Search,
Bell,
} from 'lucide-react' } from 'lucide-react'
import clsx from 'clsx' import clsx from 'clsx'
import Link from 'next/link' import Link from 'next/link'

View File

@ -705,10 +705,12 @@ export default function PortfolioPage() {
{valuation.confidence} {valuation.confidence}
</span> </span>
</div> </div>
{valuation.valuation_formula && (
<div className="p-3 bg-foreground/5 rounded-lg"> <div className="p-3 bg-foreground/5 rounded-lg">
<p className="text-foreground-muted mb-1">Valuation Formula</p> <p className="text-foreground-muted mb-1">Valuation Formula</p>
<p className="text-foreground font-mono text-xs break-all">{valuation.valuation_formula}</p> <p className="text-foreground font-mono text-xs break-all">{valuation.valuation_formula}</p>
</div> </div>
)}
<div className="p-3 bg-amber-400/10 border border-amber-400/20 rounded-lg text-xs text-amber-400"> <div className="p-3 bg-amber-400/10 border border-amber-400/20 rounded-lg text-xs text-amber-400">
<p>This is an algorithmic estimate based on domain length, TLD, and market patterns. Actual market value may vary.</p> <p>This is an algorithmic estimate based on domain length, TLD, and market patterns. Actual market value may vary.</p>
</div> </div>

View File

@ -575,10 +575,9 @@ export default function CommandTldDetailPage() {
${registrar.renewal_price.toFixed(2)} ${registrar.renewal_price.toFixed(2)}
</span> </span>
{hasRenewalTrap && ( {hasRenewalTrap && (
<AlertTriangle <span title={`Renewal trap: ${(registrar.renewal_price / registrar.registration_price).toFixed(1)}x registration price`}>
className="w-3.5 h-3.5 text-amber-400 cursor-help" <AlertTriangle className="w-3.5 h-3.5 text-amber-400 cursor-help" />
title={`Renewal trap: ${(registrar.renewal_price / registrar.registration_price).toFixed(1)}x registration price`} </span>
/>
)} )}
</div> </div>
</td> </td>

View File

@ -133,8 +133,8 @@ export default function WatchlistPage() {
], [stats]) ], [stats])
// Callbacks - prevent recreation on every render // Callbacks - prevent recreation on every render
const handleAddDomain = useCallback(async (e: React.FormEvent) => { const handleAddDomain = useCallback(async (e?: React.FormEvent) => {
e.preventDefault() e?.preventDefault()
if (!newDomain.trim()) return if (!newDomain.trim()) return
setAdding(true) setAdding(true)
@ -227,7 +227,7 @@ export default function WatchlistPage() {
<div> <div>
<span className="font-mono font-medium text-foreground">{domain.name}</span> <span className="font-mono font-medium text-foreground">{domain.name}</span>
{domain.is_available && ( {domain.is_available && (
<Badge variant="success" size="xs" className="ml-2">AVAILABLE</Badge> <span className="ml-2"><Badge variant="success" size="xs">AVAILABLE</Badge></span>
)} )}
</div> </div>
</div> </div>

View File

@ -108,15 +108,15 @@ export default function PrivacyPage() {
</p> </p>
<ul className="space-y-3 font-mono text-sm text-white/60"> <ul className="space-y-3 font-mono text-sm text-white/60">
<li className="flex items-start gap-3"> <li className="flex items-start gap-3">
<span className="text-accent mt-1">>></span> <span className="text-accent mt-1">{'>>'}</span>
Provide millisecond-latency domain availability checks. Provide millisecond-latency domain availability checks.
</li> </li>
<li className="flex items-start gap-3"> <li className="flex items-start gap-3">
<span className="text-accent mt-1">>></span> <span className="text-accent mt-1">{'>>'}</span>
Execute automated acquisition strategies (Sniper Mode). Execute automated acquisition strategies (Sniper Mode).
</li> </li>
<li className="flex items-start gap-3"> <li className="flex items-start gap-3">
<span className="text-accent mt-1">>></span> <span className="text-accent mt-1">{'>>'}</span>
Process encrypted transactions via secure gateways. Process encrypted transactions via secure gateways.
</li> </li>
</ul> </ul>

View File

@ -906,6 +906,7 @@ export interface DomainValuation {
confidence: string confidence: string
source: string source: string
calculated_at: string calculated_at: string
valuation_formula?: string
} }
export interface PriceAlert { export interface PriceAlert {