Просмотр исходного кода

Merge pull request #2814 from weseek/fix-fb-for-gw-2808

fix fb for temporary variable
Yuki Takei 5 лет назад
Родитель
Сommit
5e6f28ca17
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/client/js/components/Page/DisplaySwitcher.jsx

+ 4 - 4
src/client/js/components/Page/DisplaySwitcher.jsx

@@ -6,15 +6,15 @@ import NavigationContainer from '../../services/NavigationContainer';
 
 const DisplaySwitcher = (props) => {
   const { navigationContainer } = props;
+  const { editorMode } = navigationContainer.state;
 
   return (
     <>
-      {navigationContainer.state.editorMode === 'view' && 'view'}
-      {navigationContainer.state.editorMode === 'edit' && 'edit'}
-      {navigationContainer.state.editorMode === 'hackmd' && 'hackmd'}
+      {editorMode === 'view' && 'view'}
+      {editorMode === 'edit' && 'edit'}
+      {editorMode === 'hackmd' && 'hackmd'}
     </>
   );
-
 };
 
 DisplaySwitcher.propTypes = {