|
@@ -187,12 +187,13 @@ export const useUpdateStateAfterSave = (pageId: string|undefined|null): (() => P
|
|
|
|
|
|
|
|
// update swr 'currentPageId', 'currentPage', remote states
|
|
// update swr 'currentPageId', 'currentPage', remote states
|
|
|
return async() => {
|
|
return async() => {
|
|
|
- await mutateCurrentPageId(pageId);
|
|
|
|
|
- const updatedPage = await mutateCurrentPage();
|
|
|
|
|
|
|
|
|
|
await mutateTagsInfo(); // get from DB
|
|
await mutateTagsInfo(); // get from DB
|
|
|
syncTagsInfoForEditor(); // sync global state for client
|
|
syncTagsInfoForEditor(); // sync global state for client
|
|
|
|
|
|
|
|
|
|
+ await mutateCurrentPageId(pageId);
|
|
|
|
|
+ const updatedPage = await mutateCurrentPage();
|
|
|
|
|
+
|
|
|
if (updatedPage == null) { return }
|
|
if (updatedPage == null) { return }
|
|
|
|
|
|
|
|
mutateEditingMarkdown(updatedPage.revision.body);
|
|
mutateEditingMarkdown(updatedPage.revision.body);
|