|
|
@@ -10,6 +10,7 @@ import {
|
|
|
Modal, ModalHeader, ModalBody, ModalFooter,
|
|
|
} from 'reactstrap';
|
|
|
|
|
|
+import { OptionsToSave } from '~/client/util/editor';
|
|
|
import { IUser } from '~/interfaces/user';
|
|
|
import { useCurrentUser } from '~/stores/context';
|
|
|
import { useEditorMode } from '~/stores/ui';
|
|
|
@@ -30,6 +31,7 @@ type ConflictDiffModalProps = {
|
|
|
onClose?: (() => void);
|
|
|
// pageContainer: PageContainer;
|
|
|
markdownOnEdit: string;
|
|
|
+ optionsToSave: OptionsToSave | undefined;
|
|
|
};
|
|
|
|
|
|
type IRevisionOnConflictWithStringDate = Omit<IRevisionOnConflict, 'createdAt'> & {
|
|
|
@@ -109,7 +111,7 @@ const ConflictDiffModalCore = (props: ConflictDiffModalProps & { currentUser: IU
|
|
|
const codeMirrorVal = uncontrolledRef.current?.editor.doc.getValue();
|
|
|
|
|
|
try {
|
|
|
- // await pageContainer.resolveConflict(codeMirrorVal, editorMode);
|
|
|
+ // await pageContainer.resolveConflict(codeMirrorVal, editorMode, props.optionsToSave);
|
|
|
// close();
|
|
|
// pageContainer.showSuccessToastr();
|
|
|
}
|
|
|
@@ -117,7 +119,7 @@ const ConflictDiffModalCore = (props: ConflictDiffModalProps & { currentUser: IU
|
|
|
// pageContainer.showErrorToastr(error);
|
|
|
}
|
|
|
|
|
|
- }, [editorMode, close]);
|
|
|
+ }, [pageContainer, editorMode, props.optionsToSave, close]);
|
|
|
|
|
|
const resizeAndCloseButtons = useMemo(() => (
|
|
|
<div className="d-flex flex-nowrap">
|