a tool for shared writing and social publishing

add key to mapped text fragment

+3 -3
+3 -3
components/Blocks/TextBlock/RenderYJSFragment.tsx
··· 1 1 import { Doc, applyUpdate, XmlElement, XmlHook, XmlText } from "yjs"; 2 2 import { nodes, marks } from "prosemirror-schema-basic"; 3 - import { CSSProperties } from "react"; 3 + import { CSSProperties, Fragment } from "react"; 4 4 import { theme } from "tailwind.config"; 5 5 import * as base64 from "base64-js"; 6 6 ··· 34 34 let deltas = node.toDelta() as Delta[]; 35 35 if (deltas.length === 0) return <br />; 36 36 return ( 37 - <> 37 + <Fragment key={index}> 38 38 {deltas.map((d, index) => { 39 39 if (d.attributes?.link) 40 40 return ( ··· 56 56 </span> 57 57 ); 58 58 })} 59 - </> 59 + </Fragment> 60 60 ); 61 61 } 62 62