SetStatus.js

 1import { withStyles } from '@material-ui/core/styles'
 2import gql from 'graphql-tag'
 3import React from 'react'
 4import Author from '../Author'
 5import Date from '../Date'
 6
 7const styles = theme => ({
 8  main: {
 9    ...theme.typography.body2
10  },
11})
12
13const SetStatus = ({op, classes}) => {
14
15  return (
16    <div className={classes.main}>
17      <Author author={op.author} bold />
18      <span> {op.status.toLowerCase()} this</span>
19      <Date date={op.date} />
20    </div>
21  )
22}
23
24SetStatus.fragment = gql`
25  fragment SetStatus on Operation {
26    ... on SetStatusOperation {
27      date
28      author {
29        name
30        email
31      }
32      status
33    }
34  }
35`
36
37export default withStyles(styles)(SetStatus)