aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings/workspaces/WorkspaceItem.js
blob: 49d67d42971426f374f476cbf27e56a88cbde99e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { intlShape } from 'react-intl';
import { observer } from 'mobx-react';
import classnames from 'classnames';
import Workspace from '../../../models/Workspace';

// const messages = defineMessages({});

@observer
class WorkspaceItem extends Component {
  static propTypes = {
    workspace: PropTypes.instanceOf(Workspace).isRequired,
  };

  static contextTypes = {
    intl: intlShape,
  };

  render() {
    const { workspace } = this.props;
    // const { intl } = this.context;

    return (
      <tr
        className={classnames({
          'service-table__row': true,
        })}
      >
        <td
          className="service-table__column-name"
          onClick={() => console.log('go to workspace', workspace.name)}
        >
          {workspace.name}
        </td>
      </tr>
    );
  }
}

export default WorkspaceItem;