zipkin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-zipkin] tacigar commented on a change in pull request #2577: Change file suffix .js to .jsx
Date Fri, 10 May 2019 04:21:22 GMT
tacigar commented on a change in pull request #2577: Change file suffix .js to .jsx
URL: https://github.com/apache/incubator-zipkin/pull/2577#discussion_r282741998
 
 

 ##########
 File path: zipkin-lens/src/components/App/Sidebar/index.js
 ##########
 @@ -14,86 +14,4 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import PropTypes from 'prop-types';
-import React from 'react';
-import { withRouter } from 'react-router';
-import Cookies from 'js-cookie';
-
-import SidebarPageOption from './SidebarPageOption';
-import Logo from '../../../img/zipkin-logo.svg';
-
-const propTypes = {
-  location: PropTypes.shape({ pathname: PropTypes.string }).isRequired,
-  history: PropTypes.shape({ push: PropTypes.func.isRequired }).isRequired,
-};
-
-class Sidebar extends React.Component {
-  constructor(props) {
-    super(props);
-    this.goBackToClassic = this.goBackToClassic.bind(this);
-  }
-
-  goBackToClassic(event) {
-    const { location, history } = this.props;
-
-    Cookies.remove('lens');
-    if (location.pathname === '/zipkin') {
-      history.push('/zipkin/');
-    } else {
-      history.push(`${location.pathname}`);
-    }
-    window.location.reload(true);
-    event.preventDefault();
-  }
-
-  render() {
-    const { location } = this.props;
-    return (
-      <div className="sidebar">
-        <div
-          to={{ pathname: '' }}
-          className="sidebar__brand-link"
-        >
-          <Logo className="sidebar__brand-logo" />
-        </div>
-        <div className="sidebar__menu">
-          <SidebarPageOption location={location} pageName="browser" />
-          <SidebarPageOption location={location} pageName="dependencies" />
-        </div>
-        {
-          Cookies.get('lens')
-            ? (
-              <div className="sidebar__go-back-to-classic-button-wrapper">
-                <button
-                  type="button"
-                  className="sidebar__go-back-to-classic-button"
-                  onClick={this.goBackToClassic}
-                >
-                  Go back to classic Zipkin
-                </button>
-              </div>
-            )
-            : null
-        }
-        <div className="sidebar__other-links">
-          <a href="https://zipkin.apache.org/" target="_blank" rel="noopener noreferrer">
-            <div className="sidebar__other-link fas fa-home" />
-          </a>
-          <a href="https://github.com/openzipkin/zipkin" target="_blank" rel="noopener
noreferrer">
-            <div className="sidebar__other-link fab fa-github" />
-          </a>
-          <a href="https://twitter.com/zipkinproject" target="_blank" rel="noopener noreferrer">
-            <div className="sidebar__other-link fab fa-twitter" />
-          </a>
-          <a href="https://gitter.im/openzipkin/zipkin/" target="_blank" rel="noopener
noreferrer">
-            <div className="sidebar__other-link fab fa-gitter" />
-          </a>
-        </div>
-      </div>
-    );
-  }
-}
-
-Sidebar.propTypes = propTypes;
-
-export default withRouter(Sidebar);
 
 Review comment:
   Move the above codes to `Sidebar.jsx`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message