Fix TypeScript key prop error on SourceCallPlayer map

Wrap SourceCallPlayer in Fragment to avoid the broken JSX env treating
key as a component prop on the custom component.
This commit is contained in:
Logan
2026-06-01 01:56:51 -04:00
parent 913fe0cbee
commit f65873d690
+6 -4
View File
@@ -1,6 +1,6 @@
"use client"; "use client";
import { useRef, useState } from "react"; import { useRef, useState, Fragment } from "react";
import { useSystems } from "@/lib/useSystems"; import { useSystems } from "@/lib/useSystems";
import { c2api } from "@/lib/c2api"; import { c2api } from "@/lib/c2api";
import type { SystemRecord, VocabularyPendingTerm } from "@/lib/types"; import type { SystemRecord, VocabularyPendingTerm } from "@/lib/types";
@@ -841,7 +841,7 @@ function SourceCallPlayer({ callId }: { callId: string }) {
setLoading(true); setLoading(true);
try { try {
const c = await c2api.getCall(callId); const c = await c2api.getCall(callId);
setCall(c as typeof call); setCall(c as unknown as typeof call);
} finally { } finally {
setLoading(false); setLoading(false);
} }
@@ -1038,8 +1038,10 @@ function VocabularyPanel({ systemId }: { systemId: string }) {
</div> </div>
{p.source_call_ids && p.source_call_ids.length > 0 && ( {p.source_call_ids && p.source_call_ids.length > 0 && (
<div className="pl-1 space-y-1"> <div className="pl-1 space-y-1">
{p.source_call_ids.map((id) => ( {p.source_call_ids.map((id: string) => (
<SourceCallPlayer key={id} callId={id} /> <Fragment key={id}>
<SourceCallPlayer callId={id} />
</Fragment>
))} ))}
</div> </div>
)} )}