Răsfoiți Sursa

add to connect each pages

ryuichi-e 5 ani în urmă
părinte
comite
9b80ef7492
1 a modificat fișierele cu 27 adăugiri și 3 ștergeri
  1. 27 3
      src/client/js/components/Navbar/ThreeStrandedButton.jsx

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

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