New task (zenflow 738246ea)

In the Pairing Simulator page, I am getting the error:

**Error:**Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Fid and fix the bug
This commit is contained in:
Zenflow
2026-03-11 13:02:24 -05:00
parent e5f7b2b053
commit c22ebbe45c
5 changed files with 107 additions and 6 deletions

View File

@@ -62,7 +62,7 @@ export default function PairingSimulator() {
setError(null)
setResult(null)
try {
const res = await fetch('/api/pedigree/coi', {
const res = await fetch('/api/pedigree/trial-pairing', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ sire_id: parseInt(sireId), dam_id: parseInt(damId) }),
@@ -204,20 +204,20 @@ export default function PairingSimulator() {
</div>
</div>
{result.common_ancestors && result.common_ancestors.length > 0 && (
{result.commonAncestors && result.commonAncestors.length > 0 && (
<div>
<h3 style={{ fontSize: '0.875rem', color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: '0.05em', marginBottom: '0.5rem' }}>
Common Ancestors ({result.common_ancestors.length})
Common Ancestors ({result.commonAncestors.length})
</h3>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.4rem' }}>
{result.common_ancestors.map((a, i) => (
{result.commonAncestors.map((a, i) => (
<span key={i} style={{
padding: '0.2rem 0.6rem',
background: 'var(--bg-tertiary)',
borderRadius: 'var(--radius-sm)',
fontSize: '0.8rem',
border: '1px solid var(--border)',
}}>{a}</span>
}}>{a.name}</span>
))}
</div>
</div>