a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pass down editor state instead of pulling from zustand

+6 -5
+6 -5
components/Blocks/TextBlock/index.tsx
··· 403 403 /> 404 404 )} 405 405 </div> 406 - <BlockifyLink entityID={props.entityID} /> 406 + <BlockifyLink entityID={props.entityID} editorState={editorState} /> 407 407 </> 408 408 ); 409 409 } 410 410 411 - const BlockifyLink = (props: { entityID: string }) => { 411 + const BlockifyLink = (props: { 412 + entityID: string; 413 + editorState: EditorState | undefined; 414 + }) => { 415 + let { editorState } = props; 412 416 let rep = useReplicache(); 413 417 let smoker = useSmoker(); 414 418 let isLocked = useEntity(props.entityID, "block/is-locked"); 415 419 let focused = useUIState((s) => s.focusedEntity?.entityID === props.entityID); 416 - let editorState = useEditorStates( 417 - (s) => s.editorStates[props.entityID], 418 - )?.editor; 419 420 420 421 let isBlueskyPost = 421 422 editorState?.doc.textContent.includes("bsky.app/") &&