fix: close editor on discarding new post
This commit is contained in:
1 parent
155e7a09d2
commit
965dc6c3c5
1 file changed
+1
-1
@@ -814,7 +814,7 @@ const PostEditor: React.FC<PostEditorProps> = ({ postId }) => {
|
||||
// Clear pending ref to prevent auto-save on unmount from resurrecting the post
|
||||
pendingChangesRef.current = null;
|
||||
useAppStore.getState().removePost(postId);
|
||||
useAppStore.getState().setSelectedPost(null);
|
||||
useAppStore.getState().closeTab(postId);
|
||||
showToast.success('Draft deleted');
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user