aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/pages')
-rw-r--r--webui/src/pages/bug/Bug.tsx4
-rw-r--r--webui/src/pages/bug/CommentForm.tsx2
-rw-r--r--webui/src/pages/bug/LabelChange.tsx2
-rw-r--r--webui/src/pages/bug/Message.tsx2
-rw-r--r--webui/src/pages/bug/SetStatus.tsx2
-rw-r--r--webui/src/pages/bug/SetTitle.tsx2
-rw-r--r--webui/src/pages/bug/Timeline.tsx2
-rw-r--r--webui/src/pages/list/BugRow.tsx4
-rw-r--r--webui/src/pages/list/Filter.tsx6
-rw-r--r--webui/src/pages/list/FilterToolbar.tsx6
-rw-r--r--webui/src/pages/list/ListQuery.tsx14
11 files changed, 24 insertions, 22 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx
index 34a3aa26..8d6d11cc 100644
--- a/webui/src/pages/bug/Bug.tsx
+++ b/webui/src/pages/bug/Bug.tsx
@@ -12,7 +12,7 @@ import { BugFragment } from './Bug.generated';
import CommentForm from './CommentForm';
import TimelineQuery from './TimelineQuery';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
main: {
maxWidth: 1000,
margin: 'auto',
@@ -103,7 +103,7 @@ function Bug({ bug }: Props) {
{bug.labels.length === 0 && (
<span className={classes.noLabel}>None yet</span>
)}
- {bug.labels.map(l => (
+ {bug.labels.map((l) => (
<li className={classes.label} key={l.name}>
<Label label={l} key={l.name} />
</li>
diff --git a/webui/src/pages/bug/CommentForm.tsx b/webui/src/pages/bug/CommentForm.tsx
index 3724baf0..f2a2eb6c 100644
--- a/webui/src/pages/bug/CommentForm.tsx
+++ b/webui/src/pages/bug/CommentForm.tsx
@@ -13,7 +13,7 @@ import { useAddCommentMutation } from './CommentForm.generated';
import { TimelineDocument } from './TimelineQuery.generated';
type StyleProps = { loading: boolean };
-const useStyles = makeStyles<Theme, StyleProps>(theme => ({
+const useStyles = makeStyles<Theme, StyleProps>((theme) => ({
container: {
margin: theme.spacing(2, 0),
padding: theme.spacing(0, 2, 2, 2),
diff --git a/webui/src/pages/bug/LabelChange.tsx b/webui/src/pages/bug/LabelChange.tsx
index 93fa8a32..c40636c1 100644
--- a/webui/src/pages/bug/LabelChange.tsx
+++ b/webui/src/pages/bug/LabelChange.tsx
@@ -8,7 +8,7 @@ import Label from 'src/components/Label';
import { LabelChangeFragment } from './LabelChangeFragment.generated';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
main: {
...theme.typography.body2,
marginLeft: theme.spacing(1) + 40,
diff --git a/webui/src/pages/bug/Message.tsx b/webui/src/pages/bug/Message.tsx
index 4a438b77..91549483 100644
--- a/webui/src/pages/bug/Message.tsx
+++ b/webui/src/pages/bug/Message.tsx
@@ -10,7 +10,7 @@ import Date from 'src/components/Date';
import { AddCommentFragment } from './MessageCommentFragment.generated';
import { CreateFragment } from './MessageCreateFragment.generated';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
author: {
fontWeight: 'bold',
},
diff --git a/webui/src/pages/bug/SetStatus.tsx b/webui/src/pages/bug/SetStatus.tsx
index e9674424..855848f9 100644
--- a/webui/src/pages/bug/SetStatus.tsx
+++ b/webui/src/pages/bug/SetStatus.tsx
@@ -8,7 +8,7 @@ import Date from 'src/components/Date';
import { SetStatusFragment } from './SetStatusFragment.generated';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
main: {
...theme.typography.body2,
marginLeft: theme.spacing(1) + 40,
diff --git a/webui/src/pages/bug/SetTitle.tsx b/webui/src/pages/bug/SetTitle.tsx
index 64b97517..98bea928 100644
--- a/webui/src/pages/bug/SetTitle.tsx
+++ b/webui/src/pages/bug/SetTitle.tsx
@@ -7,7 +7,7 @@ import Date from 'src/components/Date';
import { SetTitleFragment } from './SetTitleFragment.generated';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
main: {
...theme.typography.body2,
marginLeft: theme.spacing(1) + 40,
diff --git a/webui/src/pages/bug/Timeline.tsx b/webui/src/pages/bug/Timeline.tsx
index 73c88cdf..6e1d242e 100644
--- a/webui/src/pages/bug/Timeline.tsx
+++ b/webui/src/pages/bug/Timeline.tsx
@@ -8,7 +8,7 @@ import SetStatus from './SetStatus';
import SetTitle from './SetTitle';
import { TimelineItemFragment } from './TimelineQuery.generated';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
main: {
'& > *:not(:last-child)': {
marginBottom: theme.spacing(2),
diff --git a/webui/src/pages/list/BugRow.tsx b/webui/src/pages/list/BugRow.tsx
index 9c1883a3..8d8fb5cb 100644
--- a/webui/src/pages/list/BugRow.tsx
+++ b/webui/src/pages/list/BugRow.tsx
@@ -42,7 +42,7 @@ const BugStatus: React.FC<StatusProps> = ({
}
};
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
cell: {
display: 'flex',
alignItems: 'center',
@@ -92,7 +92,7 @@ function BugRow({ bug }: Props) {
<span className={classes.title}>{bug.title}</span>
{bug.labels.length > 0 && (
<span className={classes.labels}>
- {bug.labels.map(l => (
+ {bug.labels.map((l) => (
<Label key={l.name} label={l} />
))}
</span>
diff --git a/webui/src/pages/list/Filter.tsx b/webui/src/pages/list/Filter.tsx
index 0635e7f0..5c4a3d17 100644
--- a/webui/src/pages/list/Filter.tsx
+++ b/webui/src/pages/list/Filter.tsx
@@ -9,7 +9,7 @@ import { SvgIconProps } from '@material-ui/core/SvgIcon';
import { makeStyles } from '@material-ui/core/styles';
import ArrowDropDown from '@material-ui/icons/ArrowDropDown';
-export type Query = { [key: string]: Array<string> };
+export type Query = { [key: string]: string[] };
function parse(query: string): Query {
// TODO: extract the rest of the query?
@@ -57,12 +57,12 @@ function quote(value: string): string {
function stringify(params: Query): string {
const parts: string[][] = Object.entries(params).map(([key, values]) => {
- return values.map(value => `${key}:${quote(value)}`);
+ return values.map((value) => `${key}:${quote(value)}`);
});
return new Array<string>().concat(...parts).join(' ');
}
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
element: {
...theme.typography.body2,
color: '#444',
diff --git a/webui/src/pages/list/FilterToolbar.tsx b/webui/src/pages/list/FilterToolbar.tsx
index c568a9dd..21626416 100644
--- a/webui/src/pages/list/FilterToolbar.tsx
+++ b/webui/src/pages/list/FilterToolbar.tsx
@@ -17,7 +17,7 @@ import {
} from './Filter';
import { useBugCountQuery } from './FilterToolbar.generated';
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles((theme) => ({
toolbar: {
backgroundColor: theme.palette.grey['100'],
borderColor: theme.palette.grey['300'],
@@ -123,8 +123,8 @@ function FilterToolbar({ query, queryLocation }: Props) {
['edit', 'Recently updated'],
['edit-asc', 'Least recently updated'],
]}
- itemActive={key => hasValue('sort', key)}
- to={key => pipe(replaceParam('sort', key), loc)(params)}
+ itemActive={(key) => hasValue('sort', key)}
+ to={(key) => pipe(replaceParam('sort', key), loc)(params)}
>
Sort
</FilterDropdown>
diff --git a/webui/src/pages/list/ListQuery.tsx b/webui/src/pages/list/ListQuery.tsx
index 2d8c698a..7eb6f4c5 100644
--- a/webui/src/pages/list/ListQuery.tsx
+++ b/webui/src/pages/list/ListQuery.tsx
@@ -1,4 +1,4 @@
-import { ApolloError } from 'apollo-boost';
+import { ApolloError } from '@apollo/client';
import React, { useState, useEffect, useRef } from 'react';
import { useLocation, useHistory, Link } from 'react-router-dom';
@@ -16,7 +16,7 @@ import List from './List';
import { useListBugsQuery } from './ListQuery.generated';
type StylesProps = { searching?: boolean };
-const useStyles = makeStyles<Theme, StylesProps>(theme => ({
+const useStyles = makeStyles<Theme, StylesProps>((theme) => ({
main: {
maxWidth: 800,
margin: 'auto',
@@ -211,7 +211,7 @@ function ListQuery() {
if (bugs.pageInfo.hasNextPage) {
nextPage = {
...location,
- search: editParams(params, p => {
+ search: editParams(params, (p) => {
p.delete('last');
p.delete('before');
p.set('first', perPage);
@@ -223,7 +223,7 @@ function ListQuery() {
if (bugs.pageInfo.hasPreviousPage) {
previousPage = {
...location,
- search: editParams(params, p => {
+ search: editParams(params, (p) => {
p.delete('first');
p.delete('after');
p.set('last', perPage);
@@ -234,7 +234,7 @@ function ListQuery() {
}
// Prepare params without paging for editing filters
- const paramsWithoutPaging = editParams(params, p => {
+ const paramsWithoutPaging = editParams(params, (p) => {
p.delete('first');
p.delete('last');
p.delete('before');
@@ -243,7 +243,9 @@ function ListQuery() {
// Returns a new location with the `q` param edited
const queryLocation = (query: string) => ({
...location,
- search: editParams(paramsWithoutPaging, p => p.set('q', query)).toString(),
+ search: editParams(paramsWithoutPaging, (p) =>
+ p.set('q', query)
+ ).toString(),
});
let content;