fix: publish/draft status. handlign better

This commit is contained in:
2026-02-14 21:51:04 +01:00
parent 4b31d9d421
commit c429fb6087
5 changed files with 343 additions and 6 deletions

View File

@@ -906,6 +906,8 @@ const PostEditor: React.FC<PostEditorProps> = ({ postId }) => {
setContent(reverted.content);
setTags(reverted.tags);
setCategory(reverted.categories[0] || 'article');
// Update local post state so UI reflects the published status
setPost(reverted as PostData);
updatePost(postId, reverted as Partial<PostData>);
markClean(postId);
showToast.success('Reverted to last published version');