From 4901bdadd3918833fc2cf0ad47d73aeeb061af0d Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Sun, 22 Jul 2018 00:42:19 +0200 Subject: webui: Split into multiple, smaller components --- webui/src/BugPage.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 webui/src/BugPage.js (limited to 'webui/src/BugPage.js') diff --git a/webui/src/BugPage.js b/webui/src/BugPage.js new file mode 100644 index 00000000..ec0872eb --- /dev/null +++ b/webui/src/BugPage.js @@ -0,0 +1,29 @@ +import React from "react"; +import { Query } from "react-apollo"; +import gql from "graphql-tag"; + +import CircularProgress from "@material-ui/core/CircularProgress"; + +import Bug from "./Bug"; + +const QUERY = gql` + query GetBug($id: BugID!) { + bug(id: $id) { + ...Bug + } + } + + ${Bug.fragment} +`; + +const BugPage = ({ match }) => ( + + {({ loading, error, data }) => { + if (loading) return ; + if (error) return

Error.

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