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>
{/* Radio Test Details */}
{item.key === 'radio_test' && item.details && (
{item.key === 'radio_test' && item.details && (() => {
const d = item.details as Record<string, any>
return (
<div className="mt-2 flex flex-wrap gap-2">
{item.details.syllables !== undefined && (
{d.syllables !== undefined && (
<span className="px-2 py-0.5 bg-white/5 border border-white/10 text-[10px] font-mono text-white/50">
{item.details.syllables} syllables
{d.syllables} syllables
</span>
)}
{item.details.length !== undefined && (
{d.length !== undefined && (
<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} chars
</span>
)}
{item.details.has_hyphen && (
{d.has_hyphen && (
<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
</span>
)}
{item.details.has_digits && (
{d.has_digits && (
<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
</span>
)}
</div>
)}
)
})()}
{/* 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 && (() => {
const d = item.details as Record<string, any>
return d.registrar ? (
<div className="mt-1 text-[10px] font-mono text-white/30">
via {item.details.registrar}
via {d.registrar}
</div>
)}
) : null
})()}
</div>
</div>
</div>