From 2530cee1eac225924e1119554cf475cdc46ed7dc Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 15 Aug 2018 15:50:19 +0200 Subject: webui: reorganize the code --- webui/src/bug/BugPage.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 webui/src/bug/BugPage.js (limited to 'webui/src/bug/BugPage.js') diff --git a/webui/src/bug/BugPage.js b/webui/src/bug/BugPage.js new file mode 100644 index 00000000..a91030ab --- /dev/null +++ b/webui/src/bug/BugPage.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 BugPage = ({match}) => ( + + {({loading, error, data}) => { + if (loading) return + if (error) return

Error.

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