aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/list/List.js
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-01-31 00:24:35 +0100
committerGitHub <noreply@github.com>2020-01-31 00:24:35 +0100
commit6343c8e611dfd7af86305d1e358f513dfb1e644b (patch)
treef896bdd6bff2d0a27850e0b55f1ab2f2265665bb /webui/src/list/List.js
parent9f7953161f3ef8a6081b7950b3cc274e34666116 (diff)
parentadb28885a368e4ccffe7bfccdf45931e37f66a72 (diff)
downloadgit-bug-6343c8e611dfd7af86305d1e358f513dfb1e644b.tar.gz
Merge pull request #301 from MichaelMure/webui/issue-filtering
Issue list improvements and filtering
Diffstat (limited to 'webui/src/list/List.js')
-rw-r--r--webui/src/list/List.js48
1 files changed, 8 insertions, 40 deletions
diff --git a/webui/src/list/List.js b/webui/src/list/List.js
index 54b2fe97..63b73545 100644
--- a/webui/src/list/List.js
+++ b/webui/src/list/List.js
@@ -1,49 +1,17 @@
-import { makeStyles } from '@material-ui/styles';
-import IconButton from '@material-ui/core/IconButton';
import Table from '@material-ui/core/Table/Table';
import TableBody from '@material-ui/core/TableBody/TableBody';
-import KeyboardArrowLeft from '@material-ui/icons/KeyboardArrowLeft';
-import KeyboardArrowRight from '@material-ui/icons/KeyboardArrowRight';
import React from 'react';
import BugRow from './BugRow';
-const useStyles = makeStyles(theme => ({
- main: {
- maxWidth: 600,
- margin: 'auto',
- marginTop: theme.spacing(4),
- },
- pagination: {
- ...theme.typography.overline,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'flex-end',
- },
-}));
-
-function List({ bugs, nextPage, prevPage }) {
- const classes = useStyles();
- const { hasNextPage, hasPreviousPage } = bugs.pageInfo;
+function List({ bugs }) {
return (
- <main className={classes.main}>
- <Table className={classes.table}>
- <TableBody>
- {bugs.edges.map(({ cursor, node }) => (
- <BugRow bug={node} key={cursor} />
- ))}
- </TableBody>
- </Table>
-
- <div className={classes.pagination}>
- <div>Total: {bugs.totalCount}</div>
- <IconButton onClick={prevPage} disabled={!hasPreviousPage}>
- <KeyboardArrowLeft />
- </IconButton>
- <IconButton onClick={nextPage} disabled={!hasNextPage}>
- <KeyboardArrowRight />
- </IconButton>
- </div>
- </main>
+ <Table>
+ <TableBody>
+ {bugs.edges.map(({ cursor, node }) => (
+ <BugRow bug={node} key={cursor} />
+ ))}
+ </TableBody>
+ </Table>
);
}