diff options
author | Quentin Gliech <quentingliech@gmail.com> | 2020-09-30 17:31:48 +0200 |
---|---|---|
committer | Quentin Gliech <quentingliech@gmail.com> | 2020-09-30 17:31:48 +0200 |
commit | f4433d80c4fe6ad1ddf00bd8bcda99c15dc38450 (patch) | |
tree | 00944f334894303148980faf4a2d85723922aad3 /webui/src/pages/list/ListQuery.tsx | |
parent | db20bc34e5cd696842f459b1d0b8b6aa6457d739 (diff) | |
download | git-bug-f4433d80c4fe6ad1ddf00bd8bcda99c15dc38450.tar.gz |
webui: dependencies upgrades
Most upgrades are minor version without breaking changes.
One big upgrade is Apollo 2 -> 3, which required a few changes in the
Apollo setup (see src/apollo.ts).
Other changes are due to changes in Prettier, requiring to add
parenthesis around arrow function parameters.
Because of an incompatibility in older version of typescript-eslint with
newer versions of typescript, I had to switch to the "next" unstable
version of react-scripts. It should not break stuff though.
See typescript-eslint/typescript-eslint#2442
Diffstat (limited to 'webui/src/pages/list/ListQuery.tsx')
-rw-r--r-- | webui/src/pages/list/ListQuery.tsx | 14 |
1 files changed, 8 insertions, 6 deletions
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; |