aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/list/ListQuery.tsx
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2022-02-22 20:38:32 +0100
committerQuentin Gliech <quentingliech@gmail.com>2022-02-22 20:38:32 +0100
commitb0eb041e571dd616a9926d969bb42b3e7d6512e9 (patch)
tree5e6965b98386adb0fcd3548dc69e46daf788ccbb /webui/src/pages/list/ListQuery.tsx
parentbce4d095e16fb33d181b29aa1d3476037c0c873a (diff)
downloadgit-bug-b0eb041e571dd616a9926d969bb42b3e7d6512e9.tar.gz
webui: upgrade react-router
Diffstat (limited to 'webui/src/pages/list/ListQuery.tsx')
-rw-r--r--webui/src/pages/list/ListQuery.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/webui/src/pages/list/ListQuery.tsx b/webui/src/pages/list/ListQuery.tsx
index 8dd9668e..21818758 100644
--- a/webui/src/pages/list/ListQuery.tsx
+++ b/webui/src/pages/list/ListQuery.tsx
@@ -2,7 +2,7 @@ import { ApolloError } from '@apollo/client';
import { pipe } from '@arrows/composition';
import { useState, useEffect, useRef } from 'react';
import * as React from 'react';
-import { useLocation, useHistory, Link } from 'react-router-dom';
+import { useLocation, useNavigate, Link } from 'react-router-dom';
import { Button, FormControl, Menu, MenuItem } from '@material-ui/core';
import IconButton from '@material-ui/core/IconButton';
@@ -185,7 +185,7 @@ const Error: React.FC<ErrorProps> = ({ error }: ErrorProps) => {
function ListQuery() {
const location = useLocation();
- const history = useHistory();
+ const navigate = useNavigate();
const params = new URLSearchParams(location.search);
const query = params.has('q') ? params.get('q') || '' : 'status:open';
@@ -290,7 +290,7 @@ function ListQuery() {
const formSubmit = (e: React.FormEvent) => {
e.preventDefault();
- history.push(queryLocation(input));
+ navigate(queryLocation(input));
};
const {