From 1984d4343db770fc2c8e251a81f1ab997a4c4d5e Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 15 Aug 2018 20:31:53 +0200 Subject: webui: rework of the bug page with a timeline --- webui/src/bug/BugQuery.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 webui/src/bug/BugQuery.js (limited to 'webui/src/bug/BugQuery.js') diff --git a/webui/src/bug/BugQuery.js b/webui/src/bug/BugQuery.js new file mode 100644 index 00000000..22421414 --- /dev/null +++ b/webui/src/bug/BugQuery.js @@ -0,0 +1,30 @@ +import CircularProgress from '@material-ui/core/CircularProgress' +import gql from 'graphql-tag' +import React from 'react' +import { Query } from 'react-apollo' + +import Bug from './Bug' + +const QUERY = gql` + query GetBug($id: String!) { + defaultRepository { + bug(prefix: $id) { + ...Bug + } + } + } + + ${Bug.fragment} +` + +const BugQuery = ({match}) => ( + + {({loading, error, data}) => { + if (loading) return + if (error) return

Error: {error}

+ return + }} +
+) + +export default BugQuery -- cgit