import React from "react";
import { Query } from "react-apollo";
import gql from "graphql-tag";
import { withStyles } from "@material-ui/core/styles";
import CircularProgress from "@material-ui/core/CircularProgress";
import BugSummary from "./BugSummary";
const QUERY = gql`
{
bugs: allBugs {
...BugSummary
}
}
${BugSummary.fragment}
`;
const styles = theme => ({
main: {
maxWidth: 600,
margin: "auto",
marginTop: theme.spacing.unit * 4
}
});
const List = withStyles(styles)(({ bugs, classes }) => (
{bugs.map(bug => (
))}
));
const ListPage = () => (
{({ loading, error, data }) => {
if (loading) return ;
if (error) return Error.
;
return
;
}}
);
export default ListPage;