aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/new/NewBugPage.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/new/NewBugPage.tsx
parentbce4d095e16fb33d181b29aa1d3476037c0c873a (diff)
downloadgit-bug-b0eb041e571dd616a9926d969bb42b3e7d6512e9.tar.gz
webui: upgrade react-router
Diffstat (limited to 'webui/src/pages/new/NewBugPage.tsx')
-rw-r--r--webui/src/pages/new/NewBugPage.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/webui/src/pages/new/NewBugPage.tsx b/webui/src/pages/new/NewBugPage.tsx
index 902a94bc..3ab2a92a 100644
--- a/webui/src/pages/new/NewBugPage.tsx
+++ b/webui/src/pages/new/NewBugPage.tsx
@@ -1,5 +1,5 @@
import { FormEvent, useState } from 'react';
-import { useHistory } from 'react-router-dom';
+import { useNavigate } from 'react-router-dom';
import { Button, Paper } from '@material-ui/core';
import { makeStyles, Theme } from '@material-ui/core/styles';
@@ -49,7 +49,7 @@ function NewBugPage() {
const classes = useStyles();
let issueTitleInput: any;
- let history = useHistory();
+ let navigate = useNavigate();
function submitNewIssue(e: FormEvent) {
e.preventDefault();
@@ -63,7 +63,7 @@ function NewBugPage() {
},
}).then(function (data) {
const id = data.data?.newBug.bug.id;
- history.push('/bug/' + id);
+ navigate('/bug/' + id);
});
issueTitleInput.value = '';
}