text: import React, { Component } from 'react';
  import * as PropTypes from 'prop-types';
  import { withRouter, Link } from 'react-router-dom';
  import { compose } from 'ramda';
  import { withStyles } from '@material-ui/core/styles';
  import Button from '@material-ui/core/Button';
  import { ArrowForwardIos, Work } from '@material-ui/icons';
  import inject18n from '../../../components/i18n';
  
  const styles = (theme) => ({
    buttonHome: {
      marginRight: theme.spacing(2),
      padding: '2px 5px 2px 5px',
      minHeight: 20,
      textTransform: 'none',
      color: '#666666',
      backgroundColor: '#ffffff',
    },
    button: {
      marginRight: theme.spacing(2),
      padding: '2px 5px 2px 5px',
      minHeight: 20,
      minWidth: 20,
      textTransform: 'none',
    },
    icon: {
      marginRight: theme.spacing(1),
    },
    arrow: {
      verticalAlign: 'middle',
      marginRight: 10,
    },
  });
  
  class TopMenuInvestigateWorkspace extends Component {
    render() {
      const {
        t,
        location,
        match: {
          params: { workspaceId },
        },
        classes,
      } = this.props;
      return (
        <div>
          <Button
            component={Link}
            to="/dashboard/investigate"
            variant="contained"
            size="small"
            color="inherit"
            classes={{ root: classes.buttonHome }}
          >
            <Work className={classes.icon} fontSize="small" />
            {t('Workspaces')}
          </Button>
          <ArrowForwardIos color="inherit" classes={{ root: classes.arrow }} />
          <Button
            component={Link}
            to={`/dashboard/investigate/${workspaceId}`}
            variant={
              location.pathname === `/dashboard/investigate/${workspaceId}`
                ? 'contained'
                : 'text'
            }
            size="small"
            color={
              location.pathname === `/dashboard/investigate/${workspaceId}`
                ? 'primary'
                : 'inherit'
            }
            classes={{ root: classes.button }}
          >
            {t('Knowledge')}
          </Button>
        </div>
      );
    }
  }
  
  TopMenuInvestigateWorkspace.propTypes = {
    classes: PropTypes.object,
    location: PropTypes.object,
    match: PropTypes.object,
    t: PropTypes.func,
    history: PropTypes.object,
  };
  
  export default compose(
    inject18n,
    withRouter,
    withStyles(styles),
  )(TopMenuInvestigateWorkspace);
  