import makeStyles from '@mui/styles/makeStyles'; import { BugFragment } from './Bug.generated'; import LabelChange from './LabelChange'; import Message from './Message'; import SetStatus from './SetStatus'; import SetTitle from './SetTitle'; import { TimelineItemFragment } from './TimelineQuery.generated'; const useStyles = makeStyles((theme) => ({ main: { '& > *:not(:last-child)': { marginBottom: theme.spacing(2), }, }, })); type Props = { ops: Array; bug: BugFragment; }; function Timeline({ bug, ops }: Props) { const classes = useStyles(); return (
{ops.map((op, index) => { switch (op.__typename) { case 'BugCreateTimelineItem': return ; case 'BugAddCommentTimelineItem': return ; case 'BugLabelChangeTimelineItem': return ; case 'BugSetTitleTimelineItem': return ; case 'BugSetStatusTimelineItem': return ; } console.warn('unsupported operation type ' + op.__typename); return null; })}
); } export default Timeline;