Skip to content

Commit

Permalink
Revert "⌘ + s to continue wip state"
Browse files Browse the repository at this point in the history
This reverts commit 30ca6f1.
  • Loading branch information
miya committed Apr 9, 2024
1 parent 40656c8 commit 7a82c91
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/app/src/components/PageEditor/PageEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ declare global {

export type SaveOptions = {
wip: boolean,
slackChannels?: string,
slackChannels: string,
overwriteScopesOfDescendants?: boolean
}
export type Save = (
Expand Down Expand Up @@ -225,17 +225,16 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
}, [codeMirrorEditor, currentRevisionId, isRevisionIdRequiredForPageUpdate, mutateEditorMode, onConflict, save, updateStateAfterSave]);

const saveWithShortcut = useCallback(async() => {
const wip = currentPage?.wip ?? false;
const markdown = codeMirrorEditor?.getDoc();
const revisionId = isRevisionIdRequiredForPageUpdate ? currentRevisionId : undefined;
const page = await save(revisionId, markdown, { wip }, onConflict);
const page = await save(revisionId, markdown, undefined, onConflict);
if (page == null) {
return;
}

toastSuccess(t('toaster.save_succeeded'));
updateStateAfterSave?.();
}, [codeMirrorEditor, currentPage?.wip, currentRevisionId, isRevisionIdRequiredForPageUpdate, onConflict, save, t, updateStateAfterSave]);
}, [codeMirrorEditor, currentRevisionId, isRevisionIdRequiredForPageUpdate, onConflict, save, t, updateStateAfterSave]);


// the upload event handler
Expand Down

0 comments on commit 7a82c91

Please sign in to comment.