aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/components
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-04-08 13:24:26 +0200
committerGitHub <noreply@github.com>2021-04-08 13:24:26 +0200
commita3e098d76314fbb197a6fbd85d2e1df02c9e00fe (patch)
treecd98ec3848de4b5eb17e15daddce9b899b44ca16 /webui/src/components
parentabbed0ff129755386ccbf89409ff8c3877f86d20 (diff)
parentd80b2ad03898eb798f8c3c95a4c10bd119691e01 (diff)
downloadgit-bug-a3e098d76314fbb197a6fbd85d2e1df02c9e00fe.tar.gz
Merge pull request #626 from GlancingMind/upstream-prevent-page-reloads
Prevent page reload for redirecting components
Diffstat (limited to 'webui/src/components')
-rw-r--r--webui/src/components/BackToListButton.tsx4
-rw-r--r--webui/src/components/BugTitleForm/BugTitleForm.tsx4
2 files changed, 6 insertions, 2 deletions
diff --git a/webui/src/components/BackToListButton.tsx b/webui/src/components/BackToListButton.tsx
index 7ca53ad0..41e1d68a 100644
--- a/webui/src/components/BackToListButton.tsx
+++ b/webui/src/components/BackToListButton.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import { Link } from 'react-router-dom';
import Button from '@material-ui/core/Button';
import { makeStyles } from '@material-ui/core/styles';
@@ -25,7 +26,8 @@ function BackToListButton() {
variant="contained"
className={classes.backButton}
aria-label="back to issue list"
- href="/"
+ component={Link}
+ to="/"
>
<ArrowBackIcon />
Back to List
diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx
index a7d5a820..529f23a2 100644
--- a/webui/src/components/BugTitleForm/BugTitleForm.tsx
+++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx
@@ -1,4 +1,5 @@
import React, { useState } from 'react';
+import { Link } from 'react-router-dom';
import { Button, makeStyles, Typography } from '@material-ui/core';
@@ -157,7 +158,8 @@ function BugTitleForm({ bug }: Props) {
className={classes.greenButton}
size="small"
variant="contained"
- href="/new"
+ component={Link}
+ to="/new"
>
New bug
</Button>