|
@@ -14,7 +14,7 @@ import { useRouter } from 'next/router';
|
|
|
import Sticky from 'react-stickynode';
|
|
import Sticky from 'react-stickynode';
|
|
|
import { DropdownItem } from 'reactstrap';
|
|
import { DropdownItem } from 'reactstrap';
|
|
|
|
|
|
|
|
-import { exportAsMarkdown, updateContentWidth, deleteYjsData } from '~/client/services/page-operation';
|
|
|
|
|
|
|
+import { exportAsMarkdown, updateContentWidth, syncLatestRevisionBody } from '~/client/services/page-operation';
|
|
|
import { toastSuccess, toastError } from '~/client/util/toastr';
|
|
import { toastSuccess, toastError } from '~/client/util/toastr';
|
|
|
import { GroundGlassBar } from '~/components/Navbar/GroundGlassBar';
|
|
import { GroundGlassBar } from '~/components/Navbar/GroundGlassBar';
|
|
|
import type { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
import type { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
@@ -83,7 +83,7 @@ const PageOperationMenuItems = (props: PageOperationMenuItemsProps): JSX.Element
|
|
|
const answer = window.confirm(t('sync-latest-reevision-body.confirm'));
|
|
const answer = window.confirm(t('sync-latest-reevision-body.confirm'));
|
|
|
if (answer) {
|
|
if (answer) {
|
|
|
try {
|
|
try {
|
|
|
- await deleteYjsData(pageId);
|
|
|
|
|
|
|
+ await syncLatestRevisionBody(pageId);
|
|
|
toastSuccess(t('sync-latest-reevision-body.success-toaster'));
|
|
toastSuccess(t('sync-latest-reevision-body.success-toaster'));
|
|
|
}
|
|
}
|
|
|
catch {
|
|
catch {
|