Revert variable name

This commit is contained in:
Paulo Gustavo Veiga 2022-02-21 21:55:13 -08:00
parent eb4e6e3e71
commit 5b4134f18c
3 changed files with 4 additions and 5 deletions

View File

@ -96,7 +96,6 @@ const Editor = ({
useEffect(() => {
if (options.enableKeyboardEvents) {
console.log("options.enableKeyboardEvents"+options.enableKeyboardEvents)
DesignerKeyboard.resume();
} else {
DesignerKeyboard.pause();

View File

@ -4,7 +4,7 @@ import { ActionType } from '../maps-page/action-chooser';
import Editor from '@wisemapping/editor';
import AppI18n from '../../classes/app-i18n';
import { useSelector } from 'react-redux';
import { hotkeys } from '../../redux/editorSlice';
import { hotkeysEnabled } from '../../redux/editorSlice';
import ReactGA from 'react-ga';
import Client from '../../classes/client';
import { activeInstance } from '../../redux/clientSlice';
@ -17,7 +17,7 @@ export type EditorPropsType = {
const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
const [activeDialog, setActiveDialog] = React.useState<ActionType | null>(null);
const hotkeysEnabled = useSelector(hotkeys);
const hotkey = useSelector(hotkeysEnabled);
const userLocale = AppI18n.getUserLocale();
const client: Client = useSelector(activeInstance);
const [persistenceManager, setPersistenceManager] = React.useState<PersistenceManager>();
@ -30,7 +30,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
}, []);
// As temporal hack, editor properties are propagated from global variables...
const { mapId, options } = EditorOptionsBulder.build(userLocale.code, hotkeysEnabled, isTryMode);
const { mapId, options } = EditorOptionsBulder.build(userLocale.code, hotkey, isTryMode);
return persistenceManager ? (
<>
<Editor onAction={setActiveDialog}

View File

@ -22,7 +22,7 @@ export const editorSlice = createSlice({
},
});
export const hotkeys = (state: RootState): boolean => {
export const hotkeysEnabled = (state: RootState): boolean => {
return state.editor.hotkeysEnabled;
};