From b0eb041e571dd616a9926d969bb42b3e7d6512e9 Mon Sep 17 00:00:00 2001
From: Quentin Gliech <quentingliech@gmail.com>
Date: Tue, 22 Feb 2022 20:38:32 +0100
Subject: webui: upgrade react-router

---
 webui/src/pages/list/ListQuery.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'webui/src/pages/list/ListQuery.tsx')

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 {
-- 
cgit 

