diff options
Diffstat (limited to 'webui/src')
-rw-r--r-- | webui/src/Label.js | 12 | ||||
-rw-r--r-- | webui/src/bug/Bug.js | 8 | ||||
-rw-r--r-- | webui/src/bug/LabelChange.js | 15 | ||||
-rw-r--r-- | webui/src/list/BugRow.js | 8 |
4 files changed, 19 insertions, 24 deletions
diff --git a/webui/src/Label.js b/webui/src/Label.js index de2ccd61..fc8a3a22 100644 --- a/webui/src/Label.js +++ b/webui/src/Label.js @@ -1,4 +1,5 @@ import React from 'react'; +import gql from 'graphql-tag'; import { makeStyles } from '@material-ui/styles'; import { getContrastRatio, @@ -46,4 +47,15 @@ function Label({ label }) { ); } +Label.fragment = gql` + fragment Label on Label { + name + color { + R + G + B + } + } +`; + export default Label; diff --git a/webui/src/bug/Bug.js b/webui/src/bug/Bug.js index 3e003567..1b19149d 100644 --- a/webui/src/bug/Bug.js +++ b/webui/src/bug/Bug.js @@ -91,12 +91,7 @@ Bug.fragment = gql` status title labels { - name - color { - R - G - B - } + ...Label } createdAt author { @@ -105,6 +100,7 @@ Bug.fragment = gql` displayName } } + ${Label.fragment} `; export default Bug; diff --git a/webui/src/bug/LabelChange.js b/webui/src/bug/LabelChange.js index 73c05c43..1e05b4a6 100644 --- a/webui/src/bug/LabelChange.js +++ b/webui/src/bug/LabelChange.js @@ -50,23 +50,14 @@ LabelChange.fragment = gql` displayName } added { - name - color { - R - G - B - } + ...Label } removed { - name - color { - R - G - B - } + ...Label } } } + ${Label.fragment} `; export default LabelChange; diff --git a/webui/src/list/BugRow.js b/webui/src/list/BugRow.js index 81cccc5e..cfac4616 100644 --- a/webui/src/list/BugRow.js +++ b/webui/src/list/BugRow.js @@ -95,18 +95,14 @@ BugRow.fragment = gql` status createdAt labels { - name - color { - R - G - B - } + ...Label } author { name displayName } } + ${Label.fragment} `; export default BugRow; |