blob: a71e6583d984ab3aff351fb98e7293a4467c19fb (
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({
'workspace-table__row': true,
})}
>
<td
className="workspace-table__column-name"
onClick={() => console.log('go to workspace', workspace.name)}
>
{workspace.name}
</td>
</tr>
);
}
}
export default WorkspaceItem;
|