Skip to content

Commit

Permalink
Added failure state for reply in admin-x-activitypub (TryGhost#21487)
Browse files Browse the repository at this point in the history
no refs

Added a failure state for when a reply fails to be sent
  • Loading branch information
mike182uk authored Oct 31, 2024
1 parent f601ab3 commit 3ecfe08
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/admin-x-activitypub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryghost/admin-x-activitypub",
"version": "0.3.7",
"version": "0.3.8",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
10 changes: 10 additions & 0 deletions apps/admin-x-activitypub/src/components/global/APReplyBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ const APReplyBox: React.FC<APTextAreaProps> = ({
if (onNewReply) {
onNewReply(activity);
}
},
onError() {
showToast({
message: 'An error occurred while sending your reply.',
type: 'error'
});

setTimeout(() => {
textareaRef.current?.focus();
}, 100);
}
});
}
Expand Down

0 comments on commit 3ecfe08

Please sign in to comment.