itizawa 5 лет назад
Родитель
Сommit
9db1bc2a03
1 измененных файлов с 3 добавлено и 27 удалено
  1. 3 27
      src/client/js/components/Navbar/ThreeStrandedButton.jsx

+ 3 - 27
src/client/js/components/Navbar/ThreeStrandedButton.jsx

@@ -14,39 +14,15 @@ const ThreeStrandedButton = (props) => {
 
 
   return (
   return (
     <div className="btn-group grw-three-stranded-button" role="group " aria-label="three-stranded-button">
     <div className="btn-group grw-three-stranded-button" role="group " aria-label="three-stranded-button">
-      <button
-        type="button"
-        className="btn btn-outline-primary view-button"
-        onClick={(e) => {
-          e.preventDefault();
-          threeStrandedButtonClickedHandler('revision-body');
-          window.location.href = '#';
-          }}
-      >
+      <button type="button" className="btn btn-outline-primary view-button" onClick={() => { threeStrandedButtonClickedHandler('view') }}>
         <i className="icon-control-play icon-fw" />
         <i className="icon-control-play icon-fw" />
         { t('view') }
         { t('view') }
       </button>
       </button>
-      <button
-        type="button"
-        className="btn btn-outline-primary edit-button"
-        onClick={(e) => {
-          e.preventDefault();
-          threeStrandedButtonClickedHandler('edit');
-          window.location.href = '#edit';
-        }}
-      >
+      <button type="button" className="btn btn-outline-primary edit-button" onClick={() => { threeStrandedButtonClickedHandler('edit') }}>
         <i className="icon-note icon-fw" />
         <i className="icon-note icon-fw" />
         { t('Edit') }
         { t('Edit') }
       </button>
       </button>
-      <button
-        type="button"
-        className="btn btn-outline-primary edit-button"
-        onClick={(e) => {
-          e.preventDefault();
-          threeStrandedButtonClickedHandler('hackmd');
-          window.location.href = '#hackmd';
-        }}
-      >
+      <button type="button" className="btn btn-outline-primary hackmd-button" onClick={() => { threeStrandedButtonClickedHandler('hackmd') }}>
         <i className="fa fa-fw fa-file-text-o" />
         <i className="fa fa-fw fa-file-text-o" />
         { t('hackmd.hack_md') }
         { t('hackmd.hack_md') }
       </button>
       </button>