Fix TypeScript type casting for details object
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

This commit is contained in:
2025-12-17 10:00:27 +01:00
parent 2553c7d4c4
commit 7885884e45

View File

@ -489,37 +489,43 @@ export function AnalyzePanel() {
</div> </div>
{/* Radio Test Details */} {/* Radio Test Details */}
{item.key === 'radio_test' && item.details && ( {item.key === 'radio_test' && item.details && (() => {
<div className="mt-2 flex flex-wrap gap-2"> const d = item.details as Record<string, any>
{item.details.syllables !== undefined && ( return (
<span className="px-2 py-0.5 bg-white/5 border border-white/10 text-[10px] font-mono text-white/50"> <div className="mt-2 flex flex-wrap gap-2">
{item.details.syllables} syllables {d.syllables !== undefined && (
</span> <span className="px-2 py-0.5 bg-white/5 border border-white/10 text-[10px] font-mono text-white/50">
)} {d.syllables} syllables
{item.details.length !== undefined && ( </span>
<span className="px-2 py-0.5 bg-white/5 border border-white/10 text-[10px] font-mono text-white/50"> )}
{item.details.length} chars {d.length !== undefined && (
</span> <span className="px-2 py-0.5 bg-white/5 border border-white/10 text-[10px] font-mono text-white/50">
)} {d.length} chars
{item.details.has_hyphen && ( </span>
<span className="px-2 py-0.5 bg-amber-500/10 border border-amber-500/20 text-[10px] font-mono text-amber-400"> )}
has hyphen {d.has_hyphen && (
</span> <span className="px-2 py-0.5 bg-amber-500/10 border border-amber-500/20 text-[10px] font-mono text-amber-400">
)} has hyphen
{item.details.has_digits && ( </span>
<span className="px-2 py-0.5 bg-amber-500/10 border border-amber-500/20 text-[10px] font-mono text-amber-400"> )}
has digits {d.has_digits && (
</span> <span className="px-2 py-0.5 bg-amber-500/10 border border-amber-500/20 text-[10px] font-mono text-amber-400">
)} has digits
</div> </span>
)} )}
</div>
)
})()}
{/* Registrar Details */} {/* Registrar Details */}
{(item.key === 'tld_cheapest_register_usd' || item.key === 'tld_cheapest_renew_usd') && item.details?.registrar && ( {(item.key === 'tld_cheapest_register_usd' || item.key === 'tld_cheapest_renew_usd') && item.details && (() => {
<div className="mt-1 text-[10px] font-mono text-white/30"> const d = item.details as Record<string, any>
via {item.details.registrar} return d.registrar ? (
</div> <div className="mt-1 text-[10px] font-mono text-white/30">
)} via {d.registrar}
</div>
) : null
})()}
</div> </div>
</div> </div>
</div> </div>