import { withStyles } from '@material-ui/core/styles'; import React from 'react'; import LabelChange from './LabelChange'; import Message from './Message'; import SetStatus from './SetStatus'; import SetTitle from './SetTitle'; const styles = theme => ({ main: { '& > *:not(:last-child)': { marginBottom: theme.spacing.unit * 2, }, }, }); class Timeline extends React.Component { props: { ops: Array, fetchMore: any => any, classes: any, }; render() { const { ops, classes } = this.props; return (
{ops.map((op, index) => { switch (op.__typename) { case 'CreateTimelineItem': return ; case 'AddCommentTimelineItem': return ; case 'LabelChangeTimelineItem': return ; case 'SetTitleTimelineItem': return ; case 'SetStatusTimelineItem': return ; default: console.log('unsupported operation type ' + op.__typename); return null; } })}
); } } export default withStyles(styles)(Timeline);