merge eva repos into single repository
This commit is contained in:
commit
200dd620ae
52 changed files with 2281 additions and 0 deletions
63
frontend/src/components/SpaceList.jsx
Normal file
63
frontend/src/components/SpaceList.jsx
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
import React from 'react';
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableRow,
|
||||
TableRowColumn,
|
||||
} from 'material-ui/Table';
|
||||
import { spacedataStruct } from '../redux/modules/spacedata';
|
||||
|
||||
export class SpaceList extends React.Component {
|
||||
static propTypes = {
|
||||
fetchSpacedata: React.PropTypes.func.isRequired,
|
||||
spacedata: spacedataStruct,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
spacedata: {
|
||||
items: [],
|
||||
},
|
||||
};
|
||||
|
||||
componentWillMount() {
|
||||
this.props.fetchSpacedata();
|
||||
}
|
||||
|
||||
render() {
|
||||
const items = this.props.spacedata.items.sort(
|
||||
(a, b) => a.space.toUpperCase().localeCompare(b.space.toUpperCase())
|
||||
);
|
||||
return (
|
||||
<Table
|
||||
selectable
|
||||
multiSelectable
|
||||
>
|
||||
<TableBody
|
||||
showRowHover
|
||||
stripedRows
|
||||
displayRowCheckbox={false}
|
||||
>
|
||||
{items
|
||||
.map(space => (
|
||||
<TableRow key={space.space}>
|
||||
<TableRowColumn>
|
||||
{space.space}
|
||||
</TableRowColumn>
|
||||
<TableRowColumn>
|
||||
<a
|
||||
href={space.url}
|
||||
style={{ textDecoration: 'none', color: 'white' }}
|
||||
>
|
||||
{space.url}
|
||||
</a>
|
||||
</TableRowColumn>
|
||||
</TableRow>
|
||||
)
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SpaceList;
|
||||
Loading…
Add table
Add a link
Reference in a new issue