Merge pull request #626 from GlancingMind/upstream-prevent-page-reloads

Prevent page reload for redirecting components
This commit is contained in:
Michael Muré 2021-04-08 13:24:26 +02:00 committed by GitHub
commit a3e098d763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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>

View File

@ -369,7 +369,8 @@ function ListQuery() {
<Button
className={classes.greenButton}
variant="contained"
href="/new"
component={Link}
to="/new"
>
New bug
</Button>