diff options
author | Lena <lena.becker-3@mni.thm.de> | 2021-03-01 21:12:53 +0100 |
---|---|---|
committer | Sascha <GlancingMind@outlook.com> | 2021-03-15 16:35:14 +0100 |
commit | ec8a9b20696da25bf1781dd190e7ec6a8fbf5687 (patch) | |
tree | 47dc3c4791073dbb372b02f20b78f254ba819775 /webui/src/pages/bug/BugQuery.tsx | |
parent | 16b176f9bf40a5fd6fb832f8858ec389826752a5 (diff) | |
download | git-bug-ec8a9b20696da25bf1781dd190e7ec6a8fbf5687.tar.gz |
Backbutton to left with patch from GlancingMind, Adjusting and 404 for missing bug pages #10
Diffstat (limited to 'webui/src/pages/bug/BugQuery.tsx')
-rw-r--r-- | webui/src/pages/bug/BugQuery.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webui/src/pages/bug/BugQuery.tsx b/webui/src/pages/bug/BugQuery.tsx index 2a70a2f8..ade64e9d 100644 --- a/webui/src/pages/bug/BugQuery.tsx +++ b/webui/src/pages/bug/BugQuery.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { RouteComponentProps } from 'react-router-dom'; +import { Redirect, RouteComponentProps } from 'react-router-dom'; import CircularProgress from '@material-ui/core/CircularProgress'; @@ -15,8 +15,8 @@ const BugQuery: React.FC<Props> = ({ match }: Props) => { variables: { id: match.params.id }, }); if (loading) return <CircularProgress />; + if (!data?.repository?.bug) return <Redirect to="/404bug" />; if (error) return <p>Error: {error}</p>; - if (!data?.repository?.bug) return <p>404.</p>; return <Bug bug={data.repository.bug} />; }; |