From d80b2ad03898eb798f8c3c95a4c10bd119691e01 Mon Sep 17 00:00:00 2001
From: Sascha <GlancingMind@outlook.com>
Date: Sun, 28 Mar 2021 11:02:48 +0200
Subject: Prevent page reload for redirecting components

Link instantly to:

- NewBugPage
- BackToList
---
 webui/src/components/BugTitleForm/BugTitleForm.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'webui/src/components/BugTitleForm/BugTitleForm.tsx')

diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx
index a7d5a8204..529f23a2e 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>
-- 
cgit v1.2.3

