Reset markdown preview state on certain conditions
This commit is contained in:
@@ -331,6 +331,7 @@ export default function App() {
|
|||||||
setDraftBaseVersionId(null);
|
setDraftBaseVersionId(null);
|
||||||
setViewingVersion(null);
|
setViewingVersion(null);
|
||||||
setSelectedHistoryId(null);
|
setSelectedHistoryId(null);
|
||||||
|
setMarkdownPreview(false);
|
||||||
historySnapshotRef.current = null;
|
historySnapshotRef.current = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -367,6 +368,7 @@ export default function App() {
|
|||||||
setSelectedHistoryId(
|
setSelectedHistoryId(
|
||||||
draft ? `draft:${selectedTextId}` : manualVersion?.id ?? null
|
draft ? `draft:${selectedTextId}` : manualVersion?.id ?? null
|
||||||
);
|
);
|
||||||
|
setMarkdownPreview(false);
|
||||||
historySnapshotRef.current = null;
|
historySnapshotRef.current = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user