diff options
author | Michael Muré <batolettre@gmail.com> | 2019-05-22 20:09:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 20:09:29 +0200 |
commit | e781d6c7fe7dba2fc526c2049aa188c9988e1cf4 (patch) | |
tree | 5d51b4fbf5c6dfd8439d01e4a900f074bf8d9ac1 /webui/src/bug/SetTitle.js | |
parent | 1a7ccd594adc6f185115ce12a4368c55ff418678 (diff) | |
parent | a43c7ea1c8caa61fa92bf384cd7436476fcb2b0b (diff) | |
download | git-bug-e781d6c7fe7dba2fc526c2049aa188c9988e1cf4.tar.gz git-bug-e781d6c7fe7dba2fc526c2049aa188c9988e1cf4.zip |
Merge pull request #148 from MichaelMure/sandhose/webui-update-deps
Updates WebUI dependencies & rework the bug list pagination
Diffstat (limited to 'webui/src/bug/SetTitle.js')
-rw-r--r-- | webui/src/bug/SetTitle.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/webui/src/bug/SetTitle.js b/webui/src/bug/SetTitle.js index f5c48568..d9a09ad5 100644 --- a/webui/src/bug/SetTitle.js +++ b/webui/src/bug/SetTitle.js @@ -1,10 +1,10 @@ -import { withStyles } from '@material-ui/core/styles'; +import { makeStyles } from '@material-ui/styles'; import gql from 'graphql-tag'; import React from 'react'; import Author from '../Author'; import Date from '../Date'; -const styles = theme => ({ +const useStyles = makeStyles(theme => ({ main: { ...theme.typography.body2, marginLeft: theme.spacing.unit + 40, @@ -12,9 +12,10 @@ const styles = theme => ({ bold: { fontWeight: 'bold', }, -}); +})); -const SetTitle = ({ op, classes }) => { +function SetTitle({ op }) { + const classes = useStyles(); return ( <div className={classes.main}> <Author author={op.author} className={classes.bold} /> @@ -25,7 +26,7 @@ const SetTitle = ({ op, classes }) => { <Date date={op.date} /> </div> ); -}; +} SetTitle.fragment = gql` fragment SetTitle on TimelineItem { @@ -42,4 +43,4 @@ SetTitle.fragment = gql` } `; -export default withStyles(styles)(SetTitle); +export default SetTitle; |