Skip to content

Commit 2dd397a

Browse files
add query routing for exit full screen
1 parent 2de0c93 commit 2dd397a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

editor/core/reducers/editor-reducer.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,16 @@ export function editorReducer(state: EditorState, action: Action): EditorState {
108108
}
109109
case "canvas-mode-goback": {
110110
const { fallback } = <CanvasModeGobackAction>action;
111+
112+
const dest = state.canvasMode_previous ?? fallback;
113+
114+
router.push({
115+
pathname: _editor_path_name,
116+
query: { ...router.query, mode: dest },
117+
// no need to set shallow here.
118+
});
119+
111120
return produce(state, (draft) => {
112-
const dest = draft.canvasMode_previous ?? fallback;
113121
assert(
114122
dest,
115123
"canvas-mode-goback: cannot resolve destination. (no fallback provided)"

0 commit comments

Comments
 (0)