瀏覽代碼

fix: zen-mode exit button not working (#5682)

David Luzar 2 年之前
父節點
當前提交
59ec1c6cee
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      src/components/Actions.tsx
  2. 1 1
      src/components/Footer.tsx

+ 3 - 3
src/components/Actions.tsx

@@ -286,17 +286,17 @@ export const UndoRedoActions = ({
 );
 
 export const ExitZenModeAction = ({
-  executeAction,
+  actionManager,
   showExitZenModeBtn,
 }: {
-  executeAction: ActionManager["executeAction"];
+  actionManager: ActionManager;
   showExitZenModeBtn: boolean;
 }) => (
   <button
     className={clsx("disable-zen-mode", {
       "disable-zen-mode--visible": showExitZenModeBtn,
     })}
-    onClick={() => executeAction(actionToggleZenMode)}
+    onClick={() => actionManager.executeAction(actionToggleZenMode)}
   >
     {t("buttons.exitZenMode")}
   </button>

+ 1 - 1
src/components/Footer.tsx

@@ -96,7 +96,7 @@ const Footer = ({
         {actionManager.renderAction("toggleShortcuts")}
       </div>
       <ExitZenModeAction
-        executeAction={actionManager.executeAction}
+        actionManager={actionManager}
         showExitZenModeBtn={showExitZenModeBtn}
       />
     </footer>