diff options
Diffstat (limited to 'webui/src/BugPage.js')
-rw-r--r-- | webui/src/BugPage.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/webui/src/BugPage.js b/webui/src/BugPage.js index 0f415841..a91030ab 100644 --- a/webui/src/BugPage.js +++ b/webui/src/BugPage.js @@ -1,10 +1,9 @@ -import React from "react"; -import { Query } from "react-apollo"; -import gql from "graphql-tag"; +import CircularProgress from '@material-ui/core/CircularProgress' +import gql from 'graphql-tag' +import React from 'react' +import { Query } from 'react-apollo' -import CircularProgress from "@material-ui/core/CircularProgress"; - -import Bug from "./Bug"; +import Bug from './Bug' const QUERY = gql` query GetBug($id: String!) { @@ -16,16 +15,16 @@ const QUERY = gql` } ${Bug.fragment} -`; +` -const BugPage = ({ match }) => ( - <Query query={QUERY} variables={{ id: match.params.id }}> - {({ loading, error, data }) => { - if (loading) return <CircularProgress />; - if (error) return <p>Error.</p>; - return <Bug bug={data.defaultRepository.bug} />; +const BugPage = ({match}) => ( + <Query query={QUERY} variables={{id: match.params.id}}> + {({loading, error, data}) => { + if (loading) return <CircularProgress/> + if (error) return <p>Error.</p> + return <Bug bug={data.defaultRepository.bug}/> }} </Query> -); +) -export default BugPage; +export default BugPage |