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/list/ListPage.js | 45 --------------------------------------------- webui/src/list/ListQuery.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 45 deletions(-) delete mode 100644 webui/src/list/ListPage.js create mode 100644 webui/src/list/ListQuery.js (limited to 'webui/src/list') diff --git a/webui/src/list/ListPage.js b/webui/src/list/ListPage.js deleted file mode 100644 index b7de735f..00000000 --- a/webui/src/list/ListPage.js +++ /dev/null @@ -1,45 +0,0 @@ -// @flow -import CircularProgress from '@material-ui/core/CircularProgress' -import gql from 'graphql-tag' -import React from 'react' -import { Query } from 'react-apollo' - -import BugRow from './BugRow' -import List from './List' - -const QUERY = gql` - query($first: Int = 10, $last: Int, $after: String, $before: String) { - defaultRepository { - bugs: allBugs(first: $first, last: $last, after: $after, before: $before) { - totalCount - edges { - cursor - node { - ...BugRow - } - } - pageInfo{ - hasNextPage - hasPreviousPage - startCursor - endCursor - } - } - } - } - - - ${BugRow.fragment} -` - -const ListPage = () => ( - - {({loading, error, data, fetchMore}) => { - if (loading) return - if (error) return

Error.

- return - }} -
-) - -export default ListPage diff --git a/webui/src/list/ListQuery.js b/webui/src/list/ListQuery.js new file mode 100644 index 00000000..3b57fcc2 --- /dev/null +++ b/webui/src/list/ListQuery.js @@ -0,0 +1,44 @@ +// @flow +import CircularProgress from '@material-ui/core/CircularProgress' +import gql from 'graphql-tag' +import React from 'react' +import { Query } from 'react-apollo' +import BugRow from './BugRow' +import List from './List' + +const QUERY = gql` + query($first: Int = 10, $last: Int, $after: String, $before: String) { + defaultRepository { + bugs: allBugs(first: $first, last: $last, after: $after, before: $before) { + totalCount + edges { + cursor + node { + ...BugRow + } + } + pageInfo{ + hasNextPage + hasPreviousPage + startCursor + endCursor + } + } + } + } + + + ${BugRow.fragment} +` + +const ListQuery = () => ( + + {({loading, error, data, fetchMore}) => { + if (loading) return + if (error) return

Error: {error}

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