a tool for shared writing and social publishing
0
fork

Configure Feed

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

bug! check for success before erroring

+10 -10
+10 -10
components/Blocks/TextBlock/index.tsx
··· 452 452 <button 453 453 onClick={async (e) => { 454 454 rep.undoManager.startGroup(); 455 - 456 455 if (isBlueskyPost && rep.rep) { 457 - await addBlueskyPostBlock( 456 + let success = await addBlueskyPostBlock( 458 457 editorState.doc.textContent, 459 458 props.entityID, 460 459 rep.rep, 461 460 ); 462 - smoker({ 463 - error: true, 464 - text: "post not found!", 465 - position: { 466 - x: e.clientX + 12, 467 - y: e.clientY, 468 - }, 469 - }); 461 + if (!success) 462 + smoker({ 463 + error: true, 464 + text: "post not found!", 465 + position: { 466 + x: e.clientX + 12, 467 + y: e.clientY, 468 + }, 469 + }); 470 470 } else { 471 471 await addLinkBlock( 472 472 editorState.doc.textContent,